code: def unflat_len(obj):
      """Return number of non-list/tuple elements in obj."""
      if not isinstance(obj, (list, tuple)):
          return 1
      else:
          return sum([unflat_len(x) for x in obj])
  
imports: from inspect import isclass
  import numpy
  import pandas
  from sktime.base import BaseEstimator
label_desc: Use image node_id 3 for calling a global function with example usage: unflat_len(obj) and returns: int, sum