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.
class_docstr_tok: ["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: Assume that all modalities have the same sample number.
  
  Returns
  -------
  Sample number in this dataset.
docstr_tok: ["Assume","that","all","modalities","have","the","same","sample","number",".","Returns","--","--","--","-","Sample","number","in","this","dataset","."]
code: def __len__(self):
      """
      Assume that all modalities have the same sample number.
  
      Returns
      -------
      Sample number in this dataset.
      """
      return self.lengths[0]
  
imports: import collections
  import copy
  import logging
  import math
  from typing import Dict, List, Optional, Sequence, Tuple, Union
  import mmcv
  import numpy
  import pandas
  import torch
  from mmcv.transforms import BaseTransform
  from mmcv.transforms.utils import cache_randomness
  from mmdet.structures.bbox import autocast_box_type
  from mmdet.utils import log_img_scale
  from mmengine.config import Config
  from mmengine.dataset import BaseDataset
  from numpy import random
  from ...constants import GET_ITEM_ERROR_RETRY, MULTI_IMAGE_MIX_DATASET, ROIS
  from ..preprocess_dataframe import MultiModalFeaturePreprocessor
  from ..utils import apply_data_processor, apply_df_preprocessor, get_per_sample_features
label_desc: Use image node_id 2 for calling the MultiImageMixDataset obj's underlying member method code with example usage: obj.__len__() and returns: self