def matching_dict_to_set(matching):
 return set(map(frozenset, matching.items()))

def matching_dict_to_set ( matching ) : return set ( map ( frozenset , matching . items ( ) ) )
converts a dictionary representing a matching to a set representing a matching .