code: def __init__(
      self,
      coco: COCO = None,
      iou_type: str = "bbox",
      results_file_name: str = "predict_results.json",
      classes_mapping: dict = None,
  ):
      self.coco = copy.deepcopy(coco)
      self.results = []
      self.classes_mapping = classes_mapping
      self.coco_evaluator = None
      assert iou_type in ["bbox"]
      self.iou_type = iou_type
      self.results_file_name = results_file_name
  
imports: import os
  import time
  import json
  import copy
  import cv2
  import numpy
  import torch
  from torchmetrics.detection.mean_ap import MeanAveragePrecision
  import torchvision
  from pycocotools.coco import COCO
  from pycocotools.cocoeval import COCOeval
  from compression.api import DataLoader, Metric
label_desc: Use image node_id 1 to create a new EvalCOCOMetric object  with example: obj = EvalCOCOMetric(coco, iou_type, results_file_name, classes_mapping)