code: def test_coco_map():
      predictions = {
          "detections": [
              DetectionPredTuple(
                  labels=torch.empty(0, dtype=torch.long),
                  scores=torch.empty(0, dtype=torch.float32),
                  boxes=torch.empty(0, 4, dtype=torch.float32),
              )
          ]
          * 3
      }
      targets = [
          {"image_id": 0, "image_width": 128, "image_height": 128},
          {"image_id": 1, "image_width": 256, "image_height": 256},
          {"image_id": 2, "image_width": 160, "image_height": 192},
      ]
  
      coco_annotations_path = os.path.join(
          os.path.dirname(__file__), "../data", "coco"
      )
      opts = argparse.Namespace(
          **{"dataset.root_val": coco_annotations_path}
      )
      stats = Statistics(opts=opts, metric_names=["coco_map"])
      stats.update(predictions, targets)
      bbox_map = stats.avg_statistics("coco_map", "bbox")
  
      np.testing.assert_equal(0.0, bbox_map)
  
file_path: ml-cvnets/tests/metrics/test_coco_map.py
imports: import argparse
  import json
  import os
  from typing import Dict, List, Tuple
  import numpy
  import torch
  from pycocotools import mask
  from cvnets.models.detection import DetectionPredTuple
  from metrics import coco_map
  from metrics.stats import Statistics
label_desc: Use image node_id 1 for calling a global function with example usage: test_coco_map() without return types