code: def main():
      args = parse_args()
      root_path = args.root_path
      with mmengine.Timer(
          print_tmpl="It takes {}s to convert BID annotation"
      ):
          files = collect_files(
              osp.join(root_path, "imgs"),
              osp.join(root_path, "annotations"),
          )
          image_infos = collect_annotations(files, nproc=args.nproc)
          generate_ann(
              root_path,
              image_infos,
              args.preserve_vertical,
              args.val_ratio,
              args.format,
          )
  
file_path: mmocr/tools/dataset_converters/textrecog/bid_converter.py
imports: import argparse
  import os
  import os.path
  import mmcv
  import mmengine
  from mmocr.utils import crop_img, dump_ocr_data
label_desc: Use image node_id 8 for calling a global function with example usage: main() without return types