code: def coco2ovd(args):
      ann_path = os.path.join(args.data_root, "annotations/")
      with open(ann_path + "instances_train2017.json", "r") as fin:
          coco_train_anno_all = json.load(fin)
  
      class_id_to_split = {}
      for item in coco_train_anno_all["categories"]:
          if item["name"] in base_classes:
              class_id_to_split[item["id"]] = "seen"
          elif item["name"] in novel_classes:
              class_id_to_split[item["id"]] = "unseen"
  
      filter_annotation(
          coco_train_anno_all, ["seen"], class_id_to_split
      )
      with open(
          ann_path + "instances_train2017_seen_2.json", "w"
      ) as fout:
          json.dump(coco_train_anno_all, fout)
  
      with open(ann_path + "instances_val2017.json", "r") as fin:
          coco_val_anno_all = json.load(fin)
  
      filter_annotation(
          coco_val_anno_all, ["seen", "unseen"], class_id_to_split
      )
      with open(ann_path + "instances_val2017_all_2.json", "w") as fout:
          json.dump(coco_val_anno_all, fout)
  
imports: import argparse
  import json
  import os.path
label_desc: Use image node_id 2 for calling a global function with example usage: coco2ovd(args) without return types