code: def get_results(
      filename,
      dataset="coco",
      task="bbox",
      metric=None,
      prints="mPC",
      aggregate="benchmark",
  ):
      assert dataset in ["coco", "voc", "cityscapes"]
  
      if dataset in ["coco", "cityscapes"]:
          results = get_coco_style_results(
              filename,
              task=task,
              metric=metric,
              prints=prints,
              aggregate=aggregate,
          )
      elif dataset == "voc":
          if task != "bbox":
              print("Only bbox analysis is supported for Pascal VOC")
              print("Will report bbox results\n")
          if metric not in [None, ["AP"], ["AP50"]]:
              print("Only the AP50 metric is supported for Pascal VOC")
              print("Will report AP50 metric\n")
          results = get_voc_style_results(
              filename, prints=prints, aggregate=aggregate
          )
  
      return results
  
file_path: mmdetection/tools/analysis_tools/robustness_eval.py
imports: import os.path
  from argparse import ArgumentParser
  import numpy
  from mmengine.fileio import load
label_desc: Use image node_id 4 for calling a global function with example usage: get_results(filename, dataset, task, metric, prints, aggregate) and returns: results