class_docstr: AttributeParser class for parsing the datatype of the given data.
docstr: Determine the datatype of the given data.
code: def determine_type(data: Any) -> DataType:
      """Determine the datatype of the given data."""
      if data is None:
          return DataType.UNDEFINED
  
      elif isinstance(data, (pd.Series, pd.DataFrame)):
          dtype_str = str(data.index.dtype)
          if (
              AttributeParser._datetime_regex.match(dtype_str)
              is not None
          ):
              return DataType.TIME
          elif any(
              r.match(dtype_str)
              for r in AttributeParser._numeric_regexes
          ):
              return DataType.SEQUENCE
  
      elif isinstance(data, (int, float)):
          return DataType.SEQUENCE
  
      elif isinstance(data, (str, pd.Timedelta)):
          # parse_time_arg already raises an error when an invalid datatype is passed
          parse_time_arg(data)
          return DataType.TIME
  
      elif isinstance(data, list):
          dtype_list = [AttributeParser.determine_type(i) for i in data]
          if any(x != dtype_list[0] for x in dtype_list):
              raise ValueError(
                  f"Multiple dtypes for data {list(zip(dtype_list, data))}"
              )
          return dtype_list[0]
  
      raise ValueError(f"Unsupported data type {type(data)}")
  
file_path: tsflex/tsflex/utils/attribute_parsing.py
imports: import re
  from enum import IntEnum
  from typing import Any
  import pandas
  from tsflex.utils.time import parse_time_arg
label_desc: Use image node_id 1 for calling the AttributeParser obj's underlying member method code with example usage: obj.determine_type(data) and returns: DataType, DataType, DataType, DataType, DataType, dtype_list