code: def get_voc_style_results(
      filename, prints="mPC", aggregate="benchmark"
  ):
      assert aggregate in ["benchmark", "all"]
  
      if prints == "all":
          prints = ["P", "mPC", "rPC"]
      elif isinstance(prints, str):
          prints = [prints]
      for p in prints:
          assert p in ["P", "mPC", "rPC"]
  
      eval_output = load(filename)
  
      num_distortions = len(list(eval_output.keys()))
      results = np.zeros((num_distortions, 6, 20), dtype="float32")
  
      for i, distortion in enumerate(eval_output):
          for severity in eval_output[distortion]:
              mAP = [
                  eval_output[distortion][severity][j]["ap"]
                  for j in range(len(eval_output[distortion][severity]))
              ]
              results[i, severity, :] = mAP
  
      P = results[0, 0, :]
      if aggregate == "benchmark":
          mPC = np.mean(results[:15, 1:, :], axis=(0, 1))
      else:
          mPC = np.mean(results[:, 1:, :], axis=(0, 1))
      rPC = mPC / P
  
      print(f"\nmodel: {osp.basename(filename)}")
      if "P" in prints:
          print(
              f"Performance on Clean Data [P] in AP50 = {np.mean(P):0.3f}"
          )
      if "mPC" in prints:
          print(
              "Mean Performance under Corruption [mPC] in AP50 = "
              f"{np.mean(mPC):0.3f}"
          )
      if "rPC" in prints:
          print(
              "Relative Performance under Corruption [rPC] in % = "
              f"{np.mean(rPC) * 100:0.1f}"
          )
  
      return np.mean(results, axis=2, keepdims=True)
  
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 3 for calling a global function with example usage: get_voc_style_results(filename, prints, aggregate) and returns: np