code: def inverted_dict(d):
      
      return dict((force_hashable(v), k) for (k, v) in viewitems(dict(d)))
docs: Return a dict with swapped keys and values
  
      >>> inverted_dict({0: ('a', 'b'), 1: 'cd'}) == {'cd': 1, ('a', 'b'): 0}
      True