class_docstr: Abstract base class that stores data as well as any extra metadata.
  
  This allows for subclassing `torch.Tensor` and `np.ndarray` through multiple inheritance.
  
  Metadata is stored in the form of a dictionary.
  
  Behavior should be the same as extended class (e.g., `torch.Tensor` or `np.ndarray`)
  aside from the extended meta functionality.
  
  Copying of information:
  
      * For `c = a + b`, then auxiliary data (e.g., metadata) will be copied from the
        first instance of `MetaObj` if `a.is_batch` is False
        (For batched data, the metadata will be shallow copied for efficiency purposes).
docstr: Recursively flatten input and yield all instances of `MetaObj`.
  This means that for both `torch.add(a, b)`, `torch.stack([a, b])` (and
  their numpy equivalents), we return `[a, b]` if both `a` and `b` are of type
  `MetaObj`.
  
  Args:
      args: Iterables of inputs to be flattened.
  Returns:
      list of nested `MetaObj` from input.
docstr_tok: ["Recursively","flatten","input","and","yield","all","instances","of","`","MetaObj","`",".","This","means","that","for","both","`","torch.add","(","a",",","b",")","`",",","`","torch.stack","(","[","a",",","b","]",")","`","(","and","their","numpy","equivalents",")",",","we","return","`","[","a",",","b","]","`","if","both","`","a","`","and","`","b","`","are","of","type","`","MetaObj","`",".","Args",":","args",":","Iterables","of","inputs","to","be","flattened",".","Returns",":","list","of","nested","`","MetaObj","`","from","input","."]
code: def flatten_meta_objs(*args: Iterable):
      """
      Recursively flatten input and yield all instances of `MetaObj`.
      This means that for both `torch.add(a, b)`, `torch.stack([a, b])` (and
      their numpy equivalents), we return `[a, b]` if both `a` and `b` are of type
      `MetaObj`.
  
      Args:
          args: Iterables of inputs to be flattened.
      Returns:
          list of nested `MetaObj` from input.
      """
      for a in itertools.chain(*args):
          if isinstance(a, (list, tuple)):
              yield from MetaObj.flatten_meta_objs(a)
          elif isinstance(a, MetaObj):
              yield a
  
imports: from __future__ import annotations
  import itertools
  import pprint
  from copy import deepcopy
  from typing import Any, Iterable
  import numpy
  import torch
  from monai.utils import TraceKeys, first, is_immutable
label_desc: Use image node_id 2 for calling the MetaObj obj's underlying member method code with example usage: obj.flatten_meta_objs() without return types