code: def split_train_tuning_data(
      data: pd.DataFrame,
      holdout_frac: float = None,
      problem_type: str = None,
      label_column: str = None,
      random_state: int = 0,
  ) -> (pd.DataFrame, pd.DataFrame):
      """
      Splits `data` into `train_data` and `tuning_data`.
      If the problem_type is one of ['binary', 'multiclass']:
          The split will be done with stratification on the label column.
          Will guarantee at least 1 sample of every class in `data` will be present in `train_data`.
              If only 1 sample of a class exists, it will always be put in `train_data` and not `tuning_data`.
  
      Parameters
      ----------
      data : pd.DataFrame
          The data to be split
      holdout_frac : float, default = None
          The ratio of data to use as validation.
          If 0.2, 20% of the data will be used for validation, and 80% for training.
          If None, the ratio is automatically determined,
          ranging from 0.2 for small row count to 0.01 for large row count.
      random_state : int, default = 0
          The random state to use when splitting the data, to make the splitting process deterministic.
          If None, a random value is used.
  
      Returns
      -------
      Tuple of (train_data, tuning_data) of the split `data`
      """
      if holdout_frac is None:
          holdout_frac = default_holdout_frac(
              num_train_rows=len(data), hyperparameter_tune=False
          )
  
      # TODO: Hack since the recognized problem types are only binary, multiclass, and regression
      #  Problem types used for purpose of stratification, so regression = no stratification
      if problem_type in [BINARY, MULTICLASS]:
          problem_type_for_split = problem_type
      else:
          problem_type_for_split = REGRESSION
  
      train_data, tuning_data = generate_train_test_split_combined(
          data=data,
          label=label_column,
          test_size=holdout_frac,
          problem_type=problem_type_for_split,
          random_state=random_state,
      )
      return train_data, tuning_data
  
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 10 for calling a global function with example usage: split_train_tuning_data(data, holdout_frac, problem_type, label_column, random_state) and returns: train_data,  tuning_data