code: def _reversedict(d):
      
      return dict(list(zip(list(d.values()), list(d.keys()))))
docs: Internal helper for generating reverse mappings; given a
      dictionary, returns a new dictionary with keys and values swapped.