code: def import_enums_from_str(
      field_value: str,
  ) -> Union[List[DataTypesEnum], List[TaskTypesEnum]]:
      """
      Imports enums by theirs string name representation and returns list of theirs values
  
      Args:
          field_value: str representing list of
              either class:`DataTypesEnum` or class:`TaskTypesEnum` values
  
      Returns:
          list of either class:`DataTypesEnum` or class:`TaskTypesEnum` values
      """
      enums = [
          full_val.split(".")
          for full_val in field_value.strip("][").split(", ")
          if full_val
      ]
      return [
          getattr(globals()[data_type], value)
          for (data_type, value) in enums
      ]
  
imports: from importlib import import_module
  from typing import List, TYPE_CHECKING, Union
  from fedot.core.repository.dataset_types import DataTypesEnum
  from fedot.core.repository.tasks import TaskTypesEnum
label_desc: Use image node_id 2 for calling a global function with example usage: import_enums_from_str(field_value) and returns: unknown