class_docstr: Defines an evaluator for the COCO dataset.
  
  This evaluator is usually used through a metric returned by
  :func:`make_coco_metrics`.
  
  This mostly acts a wrapper around :class:`COCOEval` from the `pycocotools`
  library.
code: def __init__(self, coco_gt: COCO, iou_types: List[str]):
      assert isinstance(iou_types, (list, tuple))
      coco_gt = copy.deepcopy(coco_gt)
      self.coco_gt = coco_gt
  
      self.iou_types = iou_types
      self.coco_eval: Dict[str, COCOeval] = {}
      for iou_type in iou_types:
          self.coco_eval[iou_type] = COCOeval(coco_gt, iouType=iou_type)
  
      self.img_ids: List[int] = []
      self.eval_imgs: Dict[str, List[np.ndarray]] = {
          k: [] for k in iou_types
      }
  
imports: import copy
  import io
  from collections import OrderedDict
  from contextlib import redirect_stdout
  from typing import Any, Dict, List, Optional, Tuple, Union
  import numpy
  import pycocotools.mask
  import torch
  import torch.distributed
  from pycocotools.coco import COCO
  from pycocotools.cocoeval import COCOeval
  from avalanche.evaluation.metrics.detection import DetectionEvaluator, TCommonDetectionOutput
label_desc: Use image node_id 1 to create a new CocoEvaluator object from inherited base classes: DetectionEvaluator with example: obj = CocoEvaluator(coco_gt, iou_types)