warg.data_structures.mappings.invert_mapping

warg.data_structures.mappings.invert_mapping(m: Mapping) Mapping[source]

Invert a mapping

if a mapping does not have duplicate hashable values, then this is the same as invert_dict, otherwise values in new_m are tuples of keys with duplicate values :return: :rtype: