class_docstr: A wrapper of concatenated dataset.
  
  Same as :obj:`torch.utils.data.dataset.ConcatDataset`, but
  concat the group flag for image aspect ratio.
  
  Args:
      datasets (list[:obj:`Dataset`]): A list of datasets.
      separate_eval (bool): Whether to evaluate the results
          separately if it is used as validation dataset.
          Defaults to True.
code: def __init__(self, datasets, separate_eval=True):
      super(ConcatDataset, self).__init__(datasets)
      self.CLASSES = datasets[0].CLASSES
      self.separate_eval = separate_eval
      if not separate_eval:
          if any([isinstance(ds, CocoDataset) for ds in datasets]):
              raise NotImplementedError(
                  "Evaluating concatenated CocoDataset as a whole is not"
                  ' supported! Please set "separate_eval=True"'
              )
          elif len(set([type(ds) for ds in datasets])) != 1:
              raise NotImplementedError(
                  "All the datasets should have same types"
              )
  
      if hasattr(datasets[0], "flag"):
          flags = []
          for i in range(0, len(datasets)):
              flags.append(datasets[i].flag)
          self.flag = np.concatenate(flags)
  
imports: import bisect
  import math
  from collections import defaultdict
  import numpy
  from mmcv.utils import print_log
  from torch.utils.data.dataset import ConcatDataset
  from .builder import DATASETS
  from .coco import CocoDataset
label_desc: Use image node_id 1 to create a new ConcatDataset object from inherited base classes: _ConcatDataset with example: obj = ConcatDataset(datasets, separate_eval)