code: def get_detected_data_types(column_types: Dict):
      """
      Extract data types from column types.
  
      Parameters
      ----------
      column_types
          A dataframe's column types.
  
      Returns
      -------
      A list of detected data types.
      """
      data_types = []
      for col_type in column_types.values():
          if col_type.startswith(IMAGE) and IMAGE not in data_types:
              data_types.append(IMAGE)
          elif (
              col_type.startswith(TEXT_NER)
              and TEXT_NER not in data_types
          ):
              data_types.append(TEXT_NER)
          elif col_type.startswith(TEXT) and TEXT not in data_types:
              data_types.append(TEXT)
          elif (
              col_type.startswith(DOCUMENT)
              and DOCUMENT not in data_types
          ):
              data_types.append(DOCUMENT)
          elif (
              col_type.startswith(NUMERICAL)
              and NUMERICAL not in data_types
          ):
              data_types.append(NUMERICAL)
          elif (
              col_type.startswith(CATEGORICAL)
              and CATEGORICAL not in data_types
          ):
              data_types.append(CATEGORICAL)
          elif col_type.startswith(ROIS) and ROIS not in data_types:
              data_types.append(ROIS)
  
      return data_types
  
imports: import copy
  import logging
  import os
  import warnings
  from typing import Dict, List, Optional, Tuple, Union
  import pandas
  from omegaconf import DictConfig, OmegaConf
  from torch import nn
  from autogluon.core.utils import default_holdout_frac, generate_train_test_split_combined
  from autogluon.core.utils.loaders import load_pd
  from ..constants import BINARY, CATEGORICAL, DEFAULT_SHOT, DOCUMENT, FEW_SHOT, IMAGE, IMAGE_PATH, LABEL, MMLAB_MODELS, MULTICLASS, NER, NER_ANNOTATION, NER_TEXT, NUMERICAL, OVD, REGRESSION, ROIS, SAM, SEMANTIC_SEGMENTATION_IMG, TEXT, TEXT_NER
  from ..data import CategoricalProcessor, DocumentProcessor, ImageProcessor, LabelProcessor, MixupModule, MMDetProcessor, MMOcrProcessor, MultiModalFeaturePreprocessor, NerLabelEncoder, NerProcessor, NumericalProcessor, OVDProcessor, SemanticSegImageProcessor, TextProcessor
  from ..data.infer_types import is_image_column
label_desc: Use image node_id 11 for calling a global function with example usage: get_detected_data_types(column_types) and returns: data_types