code: def flatten(n):
      if isinstance(n, tuple) or isinstance(n, list):
          for sn in n:
              yield from flatten(sn)
      elif isinstance(n, dict):
          for key in n:
              yield from flatten(n[key])
      else:
          yield n
  
label_desc: Use image node_id 2 for calling a global function with example usage: flatten(n) without return types