class_docstr: A Pytorch DataSet class to process a multimodal pd.DataFrame. It first uses a preprocessor to
  produce model-agnostic features. Then, each processor prepares customized data for one modality
  per model. For code simplicity, here we treat ground-truth label as one modality. This class is
  independent of specific data modalities and models.
docstr: Parameters
  ----------
  data
      A pd.DataFrame containing multimodal features.
  preprocessor
      A list of multimodal feature preprocessors generating model-agnostic features.
  processors
      Data processors customizing data for each modality per model.
  id_mappings
       Id-to-content mappings. The contents can be text, image, etc.
       This is used when the dataframe contains the query/response indexes instead of their contents.
  is_training
      Whether in training mode. Some data processing may be different between training
      and validation/testing/prediction, e.g., image data augmentation is used only in
      training.
code: def __init__(
      self,
      data: pd.DataFrame,
      preprocessor: List[MultiModalFeaturePreprocessor],
      processors: List[dict],
      id_mappings: Optional[
          Union[Dict[str, Dict], Dict[str, pd.Series]]
      ] = None,
      is_training: bool = False,
  ):
      """
      Parameters
      ----------
      data
          A pd.DataFrame containing multimodal features.
      preprocessor
          A list of multimodal feature preprocessors generating model-agnostic features.
      processors
          Data processors customizing data for each modality per model.
      id_mappings
           Id-to-content mappings. The contents can be text, image, etc.
           This is used when the dataframe contains the query/response indexes instead of their contents.
      is_training
          Whether in training mode. Some data processing may be different between training
          and validation/testing/prediction, e.g., image data augmentation is used only in
          training.
      """
      super().__init__()
      self.processors = processors
      self.is_training = is_training
      self._consecutive_errors = 0
  
      self.lengths = []
      for i, (per_preprocessor, per_processors_group) in enumerate(
          zip(preprocessor, processors)
      ):
          (
              modality_features,
              modality_types,
              length,
          ) = apply_df_preprocessor(
              data=data,
              df_preprocessor=per_preprocessor,
              modalities=per_processors_group.keys(),
          )
          self.lengths.append(length)
          setattr(self, f"modality_features_{i}", modality_features)
          setattr(self, f"modality_types_{i}", modality_types)
  
      assert len(set(self.lengths)) == 1
  
      self.id_mappings = id_mappings
  
file_path: autogluon/multimodal/src/autogluon/multimodal/data/dataset.py
imports: import logging
  from typing import Dict, List, Optional, Union
  import pandas
  import torch
  from ..constants import AUTOMM, GET_ITEM_ERROR_RETRY
  from .preprocess_dataframe import MultiModalFeaturePreprocessor
  from .utils import apply_data_processor, apply_df_preprocessor, get_per_sample_features
label_desc: Use image node_id 1 to create a new BaseDataset object from inherited base classes: torch.utils.data with example: obj = BaseDataset(data, preprocessor, processors, id_mappings, is_training)