def compare_partial_dicts(source, comparee):
 for (key, value) in six.iteritems(source):
  if ((key not in comparee) or (value != comparee[key])):
   return False
 return True

def compare_partial_dicts ( source , comparee ) : for ( key , value ) in six . iteritems ( source ) : if ( ( key not in comparee ) or ( value != comparee [ key ] ) ) : return False return True
compare dicts in a "partial" manner .