def make_key_hippie(obj, typed=True):
ftype = type if typed else lambda o: None<EOL>if is_hashable(obj):<EOL><INDENT>return obj, ftype(obj)<EOL><DEDENT>if isinstance(obj, set):<EOL><INDENT>obj = sorted(obj)<EOL><DEDENT>if isinstance(obj, (list, tuple)):<EOL><INDENT>return tuple(make_key_hippie(e, typed) for e in obj)<EOL><DEDENT>if isinstance(obj, dict):<EOL><INDENT>return tuple(sorted(((make_key_hippie(k, typed),<EOL>make_key_hippie(v, typed))<EOL>for k, v in obj.items())))<EOL><DEDENT>raise ValueError(<EOL>"<STR_LIT>"<EOL>% obj)<EOL>
Return hashable structure from non-hashable structure using hippie means

    dict and set are sorted and their content subjected to same hippie means.

    Note that the key identifies the current content of the structure.