code: def convert_annotations(
      data,
      path_prefix,
      num_sample,
      nproc,
      start_img_id=0,
      start_ann_id=0,
  ):
      modify_image_info_with_params = partial(
          modify_image_info,
          path_prefix=path_prefix,
          start_img_id=start_img_id,
      )
      modify_annotation_with_params = partial(
          modify_annotation,
          num_sample=num_sample,
          start_img_id=start_img_id,
          start_ann_id=start_ann_id,
      )
      if nproc > 1:
          data["annotations"] = mmengine.track_parallel_progress(
              modify_annotation_with_params,
              data["annotations"],
              nproc=nproc,
          )
          data["images"] = mmengine.track_parallel_progress(
              modify_image_info_with_params, data["images"], nproc=nproc
          )
      else:
          data["annotations"] = mmengine.track_progress(
              modify_annotation_with_params, data["annotations"]
          )
          data["images"] = mmengine.track_progress(
              modify_image_info_with_params,
              data["images"],
          )
      data["categories"] = [{"id": 1, "name": "text"}]
      return data
  
file_path: mmocr/tools/dataset_converters/common/curvedsyntext_converter.py
imports: import argparse
  import os.path
  from functools import partial
  import mmengine
  import numpy
  from mmocr.utils import bezier2polygon, sort_points
label_desc: Use image node_id 5 for calling a global function with example usage: convert_annotations(data, path_prefix, num_sample, nproc, start_img_id, start_ann_id) and returns: data