code: def determineEdt(obj):
      # lists
      if isinstance(obj, list):
          if len(obj) == 0:
              return Edt(Edt.LIST_EMPTY)
  
          firstElmtType = determineEdt(obj[0])
  
          for item in obj[1:]:
              if determineEdt(item) != firstElmtType:
                  return Edt(Edt.LIST_MIXED)
  
          if firstElmtType == Edt.INTEGER:
              return Edt(Edt.LIST_INTEGER)
  
          if firstElmtType == Edt.REAL:
              return Edt(Edt.LIST_REAL)
  
          if firstElmtType == Edt.STRING:
              return Edt(Edt.VECTOR_STRING)
  
          if firstElmtType == Edt.COMPLEX:
              return Edt(Edt.LIST_COMPLEX)
  
          if firstElmtType == Edt.VECTOR_STRING:
              return Edt(Edt.VECTOR_VECTOR_STRING)
  
          if firstElmtType == Edt.STEREOSAMPLE:
              raise TypeError(
                  "received a list of StereoSamples, if a VECTOR_STEREOSAMPLE is desired, create a 2-dimensional numpy.array of dimensions Nx2"
              )
  
          if firstElmtType == Edt.MATRIX_REAL:
              return Edt(Edt.VECTOR_MATRIX_REAL)
  
          if firstElmtType == Edt.TENSOR_REAL:
              return Edt(Edt.VECTOR_TENSOR_REAL)
  
          if firstElmtType == Edt.LIST_REAL:
              return Edt(Edt.LIST_LIST_REAL)
  
          if firstElmtType == Edt.LIST_COMPLEX:
              return Edt(Edt.LIST_LIST_COMPLEX)
  
          if firstElmtType == Edt.LIST_INTEGER:
              return Edt(Edt.LIST_LIST_INTEGER)
  
          if firstElmtType == Edt.LIST_EMPTY:
              return Edt(Edt.LIST_LIST_EMPTY)
  
          if isinstance(obj[0], numpy.ndarray) and obj[0].ndim == 1:
              if obj[0].dtype == numpy.dtype("single"):
                  return Edt(Edt.LIST_ARRAY_REAL)
              else:
                  return Edt(Edt.LIST_ARRAY)
  
      if isinstance(obj, numpy.ndarray) and obj.ndim == 4:
          if obj.dtype == numpy.dtype("single"):
              return Edt(Edt.TENSOR_REAL)
  
          if obj.dtype == numpy.dtype("complex64"):
              return Edt(Edt.TENSOR_COMPLEX)
  
          raise TypeError(
              "essentia can currently only accept two-dimensional numpy arrays of dtype "
              '"single"'
          )
  
      # numpy array matrices
      if isinstance(obj, numpy.ndarray) and obj.ndim == 2:
          if obj.dtype == numpy.dtype("single"):
              return Edt(Edt.MATRIX_REAL)
  
          if obj.dtype == numpy.dtype("complex64"):
              return Edt(Edt.MATRIX_COMPLEX)
  
          raise TypeError(
              "essentia can currently only accept two-dimensional numpy arrays of dtype "
              '"single"'
          )
  
      # numpy arrays
      if isinstance(obj, numpy.ndarray) and obj.ndim == 1:
          if obj.dtype == numpy.dtype("single"):
              return Edt(Edt.VECTOR_REAL)
          if obj.dtype == numpy.dtype("int"):
              return Edt(Edt.VECTOR_INTEGER)
          if obj.dtype == numpy.dtype("complex64"):
              return Edt(Edt.VECTOR_COMPLEX)
  
          raise TypeError(
              "essentia can currently only accept one-dimensional numpy arrays of dtype "
              '{"single", "int", "complex64"}, please consider using essentia.array to '
              "create your arrays"
          )
  
      # bool (must go before ints! because True and False can be ints)
      if isinstance(obj, bool):
          return Edt(Edt.BOOL)
  
      # ints
      if isinstance(obj, int):
          return Edt(Edt.INTEGER)
  
      # reals
      if isinstance(obj, float):
          return Edt(Edt.REAL)
  
      # strings
      if isinstance(obj, str):
          return Edt(Edt.STRING)
  
      if isinstance(obj, numpy.complex64):
          return Edt(Edt.COMPLEX)
  
      if isinstance(obj, complex):
          return Edt(Edt.COMPLEX)
  
      if isinstance(obj, numpy.float32):
          return Edt(Edt.NUMPY_FLOAT)
  
      if isinstance(obj, dict):
          # map parameters
          if len(obj) > 0:
              firstType = None
              allKeysAreStrings = True
              allTypesEqual = True
              for key, val in iteritems(obj):
                  if not isinstance(key, str):
                      allKeysAreStrings = False
                      break
  
                  if firstType is None:
                      firstType = determineEdt(val)
  
                  elif firstType != determineEdt(val):
                      allTypesEqual = False
                      break
  
              if allKeysAreStrings and allTypesEqual:
                  return Edt("MAP_" + str(firstType))
  
      # pools
      if isinstance(obj, Pool) or isinstance(obj, _essentia.Pool):
          return Edt(Edt.POOL)
  
      # tuples
      if (
          isinstance(obj, tuple)
          and len(obj) == 2
          and (isinstance(obj[0], float) or isinstance(obj[0], int))
          and (isinstance(obj[1], float) or isinstance(obj[1], int))
      ):
          return Edt(Edt.STEREOSAMPLE)
  
      # everything else
      return Edt(Edt.UNDEFINED)
  
imports: import numpy
  from six import iteritems
  from .None import _essentia
label_desc: Use image node_id 4 for calling a global function with example usage: determineEdt(obj) and returns: Edt, Edt, Edt, Edt, Edt, Edt, Edt, Edt, Edt, Edt, Edt, Edt, Edt, Edt, Edt, Edt, Edt, Edt, Edt, Edt, Edt, Edt, Edt, Edt, Edt, Edt, Edt, Edt, Edt, Edt, Edt, Edt, Edt