def flatten(suitable_for_isinstance):
types = set()<EOL>if not isinstance(suitable_for_isinstance, tuple):<EOL><INDENT>suitable_for_isinstance = (suitable_for_isinstance,)<EOL><DEDENT>for thing in suitable_for_isinstance:<EOL><INDENT>if isinstance(thing, tuple):<EOL><INDENT>types.update(flatten(thing))<EOL><DEDENT>else:<EOL><INDENT>types.add(thing)<EOL><DEDENT><DEDENT>return tuple(types)<EOL>
isinstance() can accept a bunch of really annoying different types:
    * a single type
    * a tuple of types
    * an arbitrary nested tree of tuples

Return a flattened tuple of the given argument.