class_docstr: A wrapper of multiple images mixed dataset.
  
  Suitable for training on multiple images mixed data augmentation like
  mosaic and mixup. For the augmentation pipeline of mixed image data,
  the `get_indexes` method needs to be provided to obtain the image
  indexes, and you can set `skip_flags` to change the pipeline running
  process. At the same time, we provide the `dynamic_scale` parameter
  to dynamically change the output image size.
  
  Args:
      dataset (:obj:`CustomDataset`): The dataset to be mixed.
      pipeline (Sequence[dict]): Sequence of transform object or
          config dict to be composed.
      dynamic_scale (tuple[int], optional): The image scale can be changed
          dynamically. Default to None. It is deprecated.
      skip_type_keys (list[str], optional): Sequence of type string to
          be skip pipeline. Default to None.
      max_refetch (int): The maximum number of retry iterations for getting
          valid results from the pipeline. If the number of iterations is
          greater than `max_refetch`, but results is still None, then the
          iteration is terminated and raise the error. Default: 15.
class_docstr_tok: ["A","wrapper","of","multiple","images","mixed","dataset",".","Suitable","for","training","on","multiple","images","mixed","data","augmentation","like","mosaic","and","mixup",".","For","the","augmentation","pipeline","of","mixed","image","data",",","the","`","get_indexes","`","method","needs","to","be","provided","to","obtain","the","image","indexes",",","and","you","can","set","`","skip_flags","`","to","change","the","pipeline","running","process",".","At","the","same","time",",","we","provide","the","`","dynamic_scale","`","parameter","to","dynamically","change","the","output","image","size",".","Args",":","dataset","(",":","obj",":","`","CustomDataset","`",")",":","The","dataset","to","be","mixed",".","pipeline","(","Sequence","[","dict","]",")",":","Sequence","of","transform","object","or","config","dict","to","be","composed",".","dynamic_scale","(","tuple","[","int","]",",","optional",")",":","The","image","scale","can","be","changed","dynamically",".","Default","to","None",".","It","is","deprecated",".","skip_type_keys","(","list","[","str","]",",","optional",")",":","Sequence","of","type","string","to","be","skip","pipeline",".","Default","to","None",".","max_refetch","(","int",")",":","The","maximum","number","of","retry","iterations","for","getting","valid","results","from","the","pipeline",".","If","the","number","of","iterations","is","greater","than","`","max_refetch","`",",","but","results","is","still","None",",","then","the","iteration","is","terminated","and","raise","the","error",".","Default",":","15","."]
code: def __getitem__(self, idx):
      results = copy.deepcopy(self.dataset[idx])
      for transform, transform_type in zip(
          self.pipeline, self.pipeline_types
      ):
          if (
              self._skip_type_keys is not None
              and transform_type in self._skip_type_keys
          ):
              continue
  
          if hasattr(transform, "get_indexes"):
              for i in range(self.max_refetch):
                  # Make sure the results passed the loading pipeline
                  # of the original dataset is not None.
                  indexes = transform.get_indexes(self.dataset)
                  if not isinstance(indexes, collections.abc.Sequence):
                      indexes = [indexes]
                  mix_results = [
                      copy.deepcopy(self.dataset[index])
                      for index in indexes
                  ]
                  if None not in mix_results:
                      results["mix_results"] = mix_results
                      break
              else:
                  raise RuntimeError(
                      "The loading pipeline of the original dataset"
                      " always return None. Please check the correctness "
                      "of the dataset and its pipeline."
                  )
  
          for i in range(self.max_refetch):
              # To confirm the results passed the training pipeline
              # of the wrapper is not None.
              updated_results = transform(copy.deepcopy(results))
              if updated_results is not None:
                  results = updated_results
                  break
          else:
              raise RuntimeError(
                  "The training pipeline of the dataset wrapper"
                  " always return None.Please check the correctness "
                  "of the dataset and its pipeline."
              )
  
          if "mix_results" in results:
              results.pop("mix_results")
  
      return results
  
file_path: mmdetection/mmdet/datasets/dataset_wrappers.py
imports: import collections
  import copy
  from typing import List, Sequence, Union
  from mmengine.dataset import BaseDataset
  from mmengine.dataset import ConcatDataset
  from mmengine.dataset import force_full_init
  from mmdet.registry import DATASETS, TRANSFORMS
label_desc: Use image node_id 6 for calling the MultiImageMixDataset obj's underlying member method code with example usage: obj.__getitem__(idx) and returns: results