code: def main():
      args = parse_args()
      if args.lmdb and args.task != "textrecog":
          raise ValueError("--lmdb only works with --task=textrecog")
      for dataset in args.datasets:
          if not osp.isdir(osp.join(args.dataset_zoo_path, dataset)):
              warnings.warn(
                  f"{dataset} is not supported yet. Please check "
                  "dataset zoo for supported datasets."
              )
              continue
          meta_path = osp.join(
              args.dataset_zoo_path, dataset, "metafile.yml"
          )
          parse_meta(args.task, meta_path)
          cfg_path = osp.join(
              args.dataset_zoo_path, dataset, args.task + ".py"
          )
          cfg = Config.fromfile(cfg_path)
          if (
              args.overwrite_cfg
              and cfg.get("config_generator", None) is not None
          ):
              cfg.config_generator.overwrite_cfg = args.overwrite_cfg
          cfg.nproc = args.nproc
          cfg.task = args.task
          cfg.dataset_name = dataset
          if args.lmdb:
              cfg = force_lmdb(cfg)
          preparer = DatasetPreparer.from_file(cfg)
          preparer.run(args.splits)
  
file_path: mmocr/tools/dataset_converters/prepare_dataset.py
imports: import argparse
  import os.path
  import time
  import warnings
  from mmengine import Config
  from mmocr.datasets.preparers import DatasetPreparer
label_desc: Use image node_id 4 for calling a global function with example usage: main() without return types