def many_to_one(input_dict):
 return dict(((key, val) for (keys, val) in input_dict.items() for key in keys))

def many_to_one ( input_dict ) : return dict ( ( ( key , val ) for ( keys , val ) in input_dict . items ( ) for key in keys ) )
convert a many-to-one mapping to a one-to-one mapping .