code: def make_key_hippie(obj, typed=True):
      ftype = type if typed else lambda o: None
      if is_hashable(obj):
          return obj, ftype(obj)
      if isinstance(obj, set):
          obj = sorted(obj)
      if isinstance(obj, (list, tuple)):
          return tuple(make_key_hippie(e, typed) for e in obj)
      if isinstance(obj, dict):
          return tuple(sorted(((make_key_hippie(k, typed),
                                make_key_hippie(v, typed))
                               for k, v in obj.items())))
      raise ValueError(
          "%r can not be hashed. Try providing a custom key function."
          % obj)