code: def _flatten(line):
      """
      Flatten an arbitrarily nested sequence.
  
      Inspired by: pd.core.common.flatten
  
      Parameters
      ----------
      line : sequence
          The sequence to flatten
  
      Notes
      -----
      This only flattens list, tuple, and dict sequences.
  
      Returns
      -------
      flattened : generator
      """
  
      for element in line:
          if any(isinstance(element, tp) for tp in (list, tuple, dict)):
              yield from _flatten(element)
          else:
              yield element
  
imports: import sys
  from collections.abc import Hashable
  from functools import wraps
  from packaging.version import Version
  from types import FunctionType
  import bokeh
  import numpy
  import pandas
  import param
  import holoviews
label_desc: Use image node_id 26 for calling a global function with example usage: _flatten(line) without return types