code: def dump_o365v2_label_map(args):
      with open(args.input, "r") as f:
          j = json.load(f)
      o_dict = {}
      for category in j["categories"]:
          index = str(int(category["id"]) - 1)
          name = category["name"]
          o_dict[index] = name
      if args.output is None:
          output = (
              os.path.dirname(args.input) + "/o365v2_label_map.json"
          )
      else:
          output = (
              os.path.dirname(args.output) + "/o365v2_label_map.json"
          )
      with open(output, "w") as f:
          json.dump(o_dict, f)
  
file_path: mmdetection/tools/dataset_converters/coco2odvg.py
imports: import argparse
  import json
  import os.path
  import jsonlines
  from pycocotools.coco import COCO
  from tqdm import tqdm
label_desc: Use image node_id 3 for calling a global function with example usage: dump_o365v2_label_map(args) without return types