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.
docstr: Evaluate the results.
  
  Args:
      results (list[list | tuple]): Testing results of the dataset.
      logger (logging.Logger | str | None): Logger used for printing
          related information during evaluation. Default: None.
  
  Returns:
      dict[str: float]: AP results of the total dataset or each separate
      dataset if `self.separate_eval=True`.
docstr_tok: ["Evaluate","the","results",".","Args",":","results","(","list","[","list","|","tuple","]",")",":","Testing","results","of","the","dataset",".","logger","(","logging.Logger","|","str","|","None",")",":","Logger","used","for","printing","related","information","during","evaluation",".","Default",":","None",".","Returns",":","dict","[","str",":","float","]",":","AP","results","of","the","total","dataset","or","each","separate","dataset","if","`","self.separate_eval=True","`","."]
code: def evaluate(self, results, logger=None, **kwargs):
      """Evaluate the results.
  
      Args:
          results (list[list | tuple]): Testing results of the dataset.
          logger (logging.Logger | str | None): Logger used for printing
              related information during evaluation. Default: None.
  
      Returns:
          dict[str: float]: AP results of the total dataset or each separate
          dataset if `self.separate_eval=True`.
      """
      assert len(results) == self.cumulative_sizes[-1], (
          "Dataset and results have different sizes: "
          f"{self.cumulative_sizes[-1]} v.s. {len(results)}"
      )
  
      # Check whether all the datasets support evaluation
      for dataset in self.datasets:
          assert hasattr(
              dataset, "evaluate"
          ), f"{type(dataset)} does not implement evaluate function"
  
      if self.separate_eval:
          dataset_idx = -1
          total_eval_results = dict()
          for size, dataset in zip(
              self.cumulative_sizes, self.datasets
          ):
              start_idx = (
                  0
                  if dataset_idx == -1
                  else self.cumulative_sizes[dataset_idx]
              )
              end_idx = self.cumulative_sizes[dataset_idx + 1]
  
              results_per_dataset = results[start_idx:end_idx]
              print_log(
                  f"\nEvaluateing {dataset.ann_file} with "
                  f"{len(results_per_dataset)} images now",
                  logger=logger,
              )
  
              eval_results_per_dataset = dataset.evaluate(
                  results_per_dataset, logger=logger, **kwargs
              )
              dataset_idx += 1
              for k, v in eval_results_per_dataset.items():
                  total_eval_results.update({f"{dataset_idx}_{k}": v})
  
          return total_eval_results
      elif any([isinstance(ds, CocoDataset) for ds in self.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 self.datasets])) != 1:
          raise NotImplementedError(
              "All the datasets should have same types"
          )
      else:
          original_data_infos = self.datasets[0].data_infos
          self.datasets[0].data_infos = sum(
              [dataset.data_infos for dataset in self.datasets], []
          )
          eval_results = self.datasets[0].evaluate(
              results, logger=logger, **kwargs
          )
          self.datasets[0].data_infos = original_data_infos
          return eval_results
  
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 3 for calling the ConcatDataset obj's underlying member method code with example usage: obj.evaluate(results, logger) and returns: total_eval_results, eval_results