class_docstr: MixUp data augmentation.
  
  .. code:: text
  
                      mixup transform
              +------------------------------+
              | mixup image   |              |
              |      +--------|--------+     |
              |      |        |        |     |
              |---------------+        |     |
              |      |                 |     |
              |      |      image      |     |
              |      |                 |     |
              |      |                 |     |
              |      |-----------------+     |
              |             pad              |
              +------------------------------+
  
  The mixup transform steps are as follows:
  
      1. Another random image is picked by dataset and embedded in
      the top left patch(after padding and resizing)
      2. The target of mixup transform is the weighted average of mixup
      image and origin image.
  
  Required Keys:
  
  - img
  - gt_bboxes (BaseBoxes[torch.float32]) (optional)
  - gt_bboxes_labels (np.int64) (optional)
  - gt_ignore_flags (bool) (optional)
  - mix_results (List[dict])
  
  
  Modified Keys:
  
  - img
  - img_shape
  - gt_bboxes (optional)
  - gt_bboxes_labels (optional)
  - gt_ignore_flags (optional)
  
  
  Args:
      img_scale (Sequence[int]): Image output size after mixup pipeline.
          The shape order should be (width, height). Defaults to (640, 640).
      ratio_range (Sequence[float]): Scale ratio of mixup image.
          Defaults to (0.5, 1.5).
      flip_ratio (float): Horizontal flip ratio of mixup image.
          Defaults to 0.5.
      pad_val (int): Pad value. Defaults to 114.
      max_iters (int): The maximum number of iterations. If the number of
          iterations is greater than `max_iters`, but gt_bbox is still
          empty, then the iteration is terminated. Defaults to 15.
      bbox_clip_border (bool, optional): Whether to clip the objects outside
          the border of the image. In some dataset like MOT17, the gt bboxes
          are allowed to cross the border of images. Therefore, we don't
          need to clip the gt bboxes in these cases. Defaults to True.
class_docstr_tok: ["MixUp","data","augmentation",".","..","code",":",":","text","mixup","transform","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","+","|","mixup","image","|","|","|","+","--","--","--","--","|","--","--","--","--","+","|","|","|","|","|","|","|","--","--","--","--","--","--","--","-+","|","|","|","|","|","|","|","|","image","|","|","|","|","|","|","|","|","|","|","|","|","--","--","--","--","--","--","--","--","-+","|","|","pad","|","+","--","--","--","--","--","--","--","--","--","--","--","--","--","--","--","+","The","mixup","transform","steps","are","as","follows",":","1",".","Another","random","image","is","picked","by","dataset","and","embedded","in","the","top","left","patch","(","after","padding","and","resizing",")","2",".","The","target","of","mixup","transform","is","the","weighted","average","of","mixup","image","and","origin","image",".","Required","Keys",":","-","img","-","gt_bboxes","(","BaseBoxes","[","torch.float32","]",")","(","optional",")","-","gt_bboxes_labels","(","np.int64",")","(","optional",")","-","gt_ignore_flags","(","bool",")","(","optional",")","-","mix_results","(","List","[","dict","]",")","Modified","Keys",":","-","img","-","img_shape","-","gt_bboxes","(","optional",")","-","gt_bboxes_labels","(","optional",")","-","gt_ignore_flags","(","optional",")","Args",":","img_scale","(","Sequence","[","int","]",")",":","Image","output","size","after","mixup","pipeline",".","The","shape","order","should","be","(","width",",","height",")",".","Defaults","to","(","640",",","640",")",".","ratio_range","(","Sequence","[","float","]",")",":","Scale","ratio","of","mixup","image",".","Defaults","to","(","0.5",",","1.5",")",".","flip_ratio","(","float",")",":","Horizontal","flip","ratio","of","mixup","image",".","Defaults","to","0.5.","pad_val","(","int",")",":","Pad","value",".","Defaults","to","114.","max_iters","(","int",")",":","The","maximum","number","of","iterations",".","If","the","number","of","iterations","is","greater","than","`","max_iters","`",",","but","gt_bbox","is","still","empty",",","then","the","iteration","is","terminated",".","Defaults","to","15.","bbox_clip_border","(","bool",",","optional",")",":","Whether","to","clip","the","objects","outside","the","border","of","the","image",".","In","some","dataset","like","MOT17",",","the","gt","bboxes","are","allowed","to","cross","the","border","of","images",".","Therefore",",","we","don't","need","to","clip","the","gt","bboxes","in","these","cases",".","Defaults","to","True","."]
docstr: Call function to collect indexes.
  
  Args:
      dataset (:obj:`MultiImageMixDataset`): The dataset.
  
  Returns:
      list: indexes.
docstr_tok: ["Call","function","to","collect","indexes",".","Args",":","dataset","(",":","obj",":","`","MultiImageMixDataset","`",")",":","The","dataset",".","Returns",":","list",":","indexes","."]
code: def get_indexes(self, dataset: BaseDataset) -> int:
      """Call function to collect indexes.
  
      Args:
          dataset (:obj:`MultiImageMixDataset`): The dataset.
  
      Returns:
          list: indexes.
      """
  
      index = [np.random.randint(0, len(dataset)) for _ in range(1)]
  
      return index
  
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 MixUp obj's underlying member method code with example usage: obj.get_indexes(dataset) and returns: index