code: def main():
      args = parse_args()
      root_path = args.root_path
      print("Processing training set...")
      convert_hiertext(
          root_path=root_path,
          split="train",
          level=args.level,
          preserve_vertical=args.preserve_vertical,
          nproc=args.nproc,
      )
      print("Processing validation set...")
      convert_hiertext(
          root_path=root_path,
          split="val",
          level=args.level,
          preserve_vertical=args.preserve_vertical,
          nproc=args.nproc,
      )
      print("Finish")
  
file_path: mmocr/tools/dataset_converters/textrecog/hiertext_converter.py
imports: import argparse
  import json
  import math
  import os.path
  from functools import partial
  import mmcv
  import mmengine
  import numpy
  from shapely.geometry import Polygon
  from mmocr.utils import dump_ocr_data
label_desc: Use image node_id 6 for calling a global function with example usage: main() without return types