code: def main():
      args = parse_args()
      image_infos = parse_coco_json(args.in_path)
      task_name = args.task
      if task_name == "auto":
          task_name = "textdet"
          if "text" in image_infos[0]["anno_info"][0]:
              task_name = "textspotter"
      dump_ocr_data(image_infos, args.out_path, task_name)
      print("finish")
  
file_path: mmocr/tools/dataset_converters/textdet/data_migrator.py
imports: import argparse
  from collections import defaultdict
  from copy import deepcopy
  from typing import Dict, List
  import mmengine
  from mmocr.utils import dump_ocr_data
label_desc: Use image node_id 3 for calling a global function with example usage: main() without return types