code: def bbox_map_eval(det_result, annotation, nproc=4):
      """Evaluate mAP of single image det result.
  
      Args:
          det_result (list[list]): [[cls1_det, cls2_det, ...], ...].
              The outer list indicates images, and the inner list indicates
              per-class detected bboxes.
          annotation (dict): Ground truth annotations where keys of
               annotations are:
  
              - bboxes: numpy array of shape (n, 4)
              - labels: numpy array of shape (n, )
              - bboxes_ignore (optional): numpy array of shape (k, 4)
              - labels_ignore (optional): numpy array of shape (k, )
  
          nproc (int): Processes used for computing mAP.
              Default: 4.
  
      Returns:
          float: mAP
      """
  
      # use only bbox det result
      if isinstance(det_result, tuple):
          bbox_det_result = [det_result[0]]
      else:
          bbox_det_result = [det_result]
      # mAP
      iou_thrs = np.linspace(
          0.5,
          0.95,
          int(np.round((0.95 - 0.5) / 0.05)) + 1,
          endpoint=True,
      )
  
      processes = []
      workers = Pool(processes=nproc)
      for thr in iou_thrs:
          p = workers.apply_async(
              eval_map,
              (bbox_det_result, [annotation]),
              {"iou_thr": thr, "logger": "silent", "nproc": 1},
          )
          processes.append(p)
  
      workers.close()
      workers.join()
  
      mean_aps = []
      for p in processes:
          mean_aps.append(p.get()[0])
  
      return sum(mean_aps) / len(mean_aps)
  
imports: import argparse
  import os.path
  from multiprocessing import Pool
  import mmcv
  import numpy
  from mmengine.config import Config, DictAction
  from mmengine.fileio import load
  from mmengine.registry import init_default_scope
  from mmengine.runner import Runner
  from mmengine.structures import InstanceData, PixelData
  from mmengine.utils import ProgressBar, check_file_exist, mkdir_or_exist
  from mmdet.datasets import get_loading_pipeline
  from mmdet.evaluation import eval_map
  from mmdet.registry import DATASETS, RUNNERS
  from mmdet.structures import DetDataSample
  from mmdet.utils import replace_cfg_vals, update_data_root
  from mmdet.visualization import DetLocalVisualizer
label_desc: Use image node_id 1 for calling a global function with example usage: bbox_map_eval(det_result, annotation, nproc) and returns: unknown