code: def convert_openimages(
      root_path,
      dst_image_path,
      dst_label_filename,
      annotation_filename,
      img_start_idx=0,
      nproc=1,
  ):
      annotation_path = osp.join(root_path, annotation_filename)
      if not osp.exists(annotation_path):
          raise Exception(
              f"{annotation_path} not exists, please check and try again."
          )
      src_image_root = root_path
  
      # outputs
      dst_label_file = osp.join(root_path, dst_label_filename)
      dst_image_root = osp.join(root_path, dst_image_path)
      os.makedirs(dst_image_root, exist_ok=True)
  
      annotation = mmengine.load(annotation_path)
  
      process_img_with_path = partial(
          process_img,
          src_image_root=src_image_root,
          dst_image_root=dst_image_root,
      )
      tasks = []
      anns = {}
      for ann in annotation["annotations"]:
          anns.setdefault(ann["image_id"], []).append(ann)
      for img_idx, img_info in enumerate(annotation["images"]):
          tasks.append(
              (img_idx + img_start_idx, img_info, anns[img_info["id"]])
          )
      labels_list = mmengine.track_parallel_progress(
          process_img_with_path, tasks, keep_order=True, nproc=nproc
      )
      final_labels = []
      for label_list in labels_list:
          final_labels += label_list
      dump_ocr_data(final_labels, dst_label_file, "textrecog")
      return len(annotation["images"])
  
file_path: mmocr/tools/dataset_converters/textrecog/openvino_converter.py
imports: import math
  import os
  import os.path
  from argparse import ArgumentParser
  from functools import partial
  import mmengine
  from PIL import Image
  from mmocr.utils import dump_ocr_data
label_desc: Use image node_id 3 for calling a global function with example usage: convert_openimages(root_path, dst_image_path, dst_label_filename, annotation_filename, img_start_idx, nproc) and returns: len