code: def main():
      args = parse_args()
      file_paths, labels = parse_legacy_data(args.in_path, args.format)
      img_infos = recog_anno_to_imginfo(file_paths, labels)
      dump_ocr_data(img_infos, args.out_path, "textrecog")
      print("finish")
  
imports: import argparse
  import json
  from typing import List, Tuple
  from mmocr.datasets import RecogLMDBDataset
  from mmocr.utils import StringStripper, dump_ocr_data, recog_anno_to_imginfo
label_desc: Use image node_id 3 for calling a global function with example usage: main() without return types