code: def flatten(suitable_for_isinstance):
      """
      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.
      """
  
      types = set()
  
      if not isinstance(suitable_for_isinstance, tuple):
          suitable_for_isinstance = (suitable_for_isinstance,)
      for thing in suitable_for_isinstance:
          if isinstance(thing, tuple):
              types.update(flatten(thing))
          else:
              types.add(thing)
      return tuple(types)
  
imports: import itertools
  import json
  import pkgutil
  import re
  from jsonschema.compat import MutableMapping, str_types, urlsplit
label_desc: Use image node_id 7 for calling a global function with example usage: flatten(suitable_for_isinstance) and returns: tuple