code: def voc_get_label_anno(ann_dir_path, ann_ids_path, labels_path):
      with open(labels_path, "r") as f:
          labels_str = f.read().split()
      labels_ids = list(range(1, len(labels_str) + 1))
  
      with open(ann_ids_path, "r") as f:
          ann_ids = [
              lin.strip().split(" ")[-1] for lin in f.readlines()
          ]
  
      ann_paths = []
      for aid in ann_ids:
          if aid.endswith("xml"):
              ann_path = os.path.join(ann_dir_path, aid)
          else:
              ann_path = os.path.join(ann_dir_path, aid + ".xml")
          ann_paths.append(ann_path)
  
      return dict(zip(labels_str, labels_ids)), ann_paths
  
imports: import argparse
  import glob
  import json
  import os
  import os.path
  import shutil
  import xml.etree.ElementTree
  import numpy
  import PIL.ImageDraw
  from tqdm import tqdm
  import cv2
label_desc: Use image node_id 8 for calling a global function with example usage: voc_get_label_anno(ann_dir_path, ann_ids_path, labels_path) and returns: dict,  ann_paths