Check if all attribute/value pairs in a also appears in b

    :param a: A dictionary
    :param b: A dictionary
    :return: True/False
551329
def dict_match(a, b):
    
    res = []
    for k, v in a.items():
        try:
            res.append(b[k] == v)
        except KeyError:
            pass
    return all(res)
597389
def has_common(self, other):
        """"""
        if not isinstance(other, WordSet):
            raise ValueError('Can compare only WordSets')
        return self.term_set & other.term_set
1266739
def index_lists_equal(a: List[Index], b: List[Index]) -> bool:
    
    n = len(a)
    if len(b) != n:
        return False
    for i in range(n):
        if not indexes_equal(a[i], b[i]):
            log.debug("Mismatch: {!r} != {!r}", a[i], b[i])
            return False
    return True
1238178
def _comprise(dict1,dict2):
    '''
        
    '''
    len_1 = dict1.__len__()
    len_2 = dict2.__len__()
    if(len_2>len_1):
        return(False)
    else:
        for k2 in dict2:
            v2 = dict2[k2]
            if(k2 in dict1):
                v1 = dict1[k2]
                if(v1 == v2):
                    return(True)
                else:
                    return(False)
            else:
                return(False)
773709
function isRelated(a, b) {
  if (a.measurementAvg === b.measurementAvg) return true;
  if (a.relatedNames &&
      a.relatedNames.has(b.measurementAvg)) {
    return true;
  }
  if (b.relatedNames &&
      b.relatedNames.has(a.measurementAvg)) {
    return true;
  }
  return false;
}
362886
private boolean attributeValuesMatch(Set attributes, int runIndex1, int runIndex2) {
        Iterator iterator = attributes.iterator();
        while (iterator.hasNext()) {
            Attribute key = (Attribute) iterator.next();
           if (!valuesMatch(getAttribute(key, runIndex1), getAttribute(key, runIndex2))) {
                return false;
            }
        }
        return true;
    }
105278
def identical(self, other):
        
        return (self.equals(other) and
                all((getattr(self, c, None) == getattr(other, c, None)
                     for c in self._comparables)) and
                type(self) == type(other))
483033
def preserve_attr_data(A, B):
    '''
    '''
    for attr, B_data in B.items(): # defined object attrs
        if getattr(B_data, 'override_parent', True):
            continue
        if attr in A:
            A_data = A[attr]
            for _attr in getattr(A_data, '_attrs', []): # Attr attrs, like type, default, & doc
                if hasattr(A_data, _attr):
                    if getattr(B_data, _attr, None) is not None:
                        if _attr in getattr(B_data, '_set_by_default', []):
                            setattr(B_data, _attr, getattr(A_data, _attr))
                    else:
                        setattr(B_data, _attr, getattr(A_data, _attr))
128097
def contains(self, other):
        """"""
        return self._start <= other.start and self._end >= other.end
517205
def joined(self, a, b):
        
        mapping = self._mapping
        try:
            return mapping[a] is mapping[b]
        except KeyError:
            return False
539470
def equal(self, a, b, message=None):
        ""
        if a != b:
            self.log_error("{} != {}".format(str(a), str(b)), message)
            return False
        return True
759081
def value_contains(self, value, attribute):
        
        for item in self[attribute]:
            if value in item:
                return True
        return False
155094
def check(a, b):
    
    aencrypt = encrypt(a)
    bencrypt = encrypt(b)

    return a == b or a == bencrypt or aencrypt == b
1216806
def contains(self, other):
        
        return (self.left <= other.left and
                self.right >= other.right and
                self.top >= other.top and
                self.bottom <= other.bottom)
489729
def in_same_box(self, a, b):
        """"""
        assert a in self.micro_indices
        assert b in self.micro_indices

        for part in self.partition:
            if a in part and b in part:
                return True

        return False
128833
def list_same(list_a, list_b):
    
    result = []
    for item in list_b:
        if item in list_a:
            result.append(item)
    return result
954060
def is_contradictory(self, other):
        
        if not isinstance(other, DictCell):
            raise Exception("Incomparable")
        for key, val in self:
            if key in other.__dict__['p'] \
                    and val.is_contradictory(other.__dict__['p'][key]):
                return True
        return False