class_docstr: Wrapper around [cocoapi evaluator](https://github.com/cocodataset/cocoapi)
  
  Calculates average precision.
  
  # Arguments
      metric_type: Dependent on the task you're solving.
      print_summary: If `True`, prints a table with statistics.
      show_pbar: If `True` shows pbar when preparing the data for evaluation.
code: def finalize(self) -> Dict[str, float]:
      with CaptureStdout():
          coco_eval = create_coco_eval(
              records=self._records,
              preds=self._preds,
              metric_type=self.metric_type.value,
              iou_thresholds=self.iou_thresholds,
              show_pbar=self.show_pbar,
          )
          coco_eval.evaluate()
          coco_eval.accumulate()
  
      with CaptureStdout(propagate_stdout=self.print_summary):
          coco_eval.summarize()
  
      stats = coco_eval.stats
      logs = {
          "AP (IoU=0.50:0.95) area=all": stats[0],
          "AP (IoU=0.50) area=all": stats[1],
          "AP (IoU=0.75) area=all": stats[2],
          "AP (IoU=0.50:0.95) area=small": stats[3],
          "AP (IoU=0.50:0.95) area=medium": stats[4],
          "AP (IoU=0.50:0.95) area=large": stats[5],
          "AR (IoU=0.50:0.95) area=all maxDets=1": stats[6],
          "AR (IoU=0.50:0.95) area=all maxDets=10": stats[7],
          "AR (IoU=0.50:0.95) area=all maxDets=100": stats[8],
          "AR (IoU=0.50:0.95) area=small maxDets=100": stats[9],
          "AR (IoU=0.50:0.95) area=medium maxDets=100": stats[10],
          "AR (IoU=0.50:0.95) area=large maxDets=100": stats[11],
      }
  
      self._reset()
      return logs
  
file_path: icevision/icevision/metrics/coco_metric/coco_metric.py
imports: from icevision.imports import *
  from icevision.utils import *
  from icevision.data import *
  from icevision.metrics.metric import *
label_desc: Use image node_id 4 for calling the COCOMetric obj's underlying member method code with example usage: obj.finalize() and returns: logs