code: def flatten(x: _typing.Any) -> _typing.List[_typing.Any]:
      r"""Returns a flattened list of objects from a nested structure."""
      l: _typing.List[_typing.Any] = []
      if isinstance(x, dict):
          for y in x.values():
              l.extend(flatten(y))
      elif (
          isinstance(x, list)
          or isinstance(x, set)
          or isinstance(x, tuple)
      ):
          for y in x:
              l.extend(flatten(y))
      else:
          l.append(x)
      return l
  
file_path: higher/higher/utils.py
imports: import torch
  import typing
label_desc: Use image node_id 7 for calling a global function with example usage: flatten(x) and returns: l