code: def main():
      args = parse_args()
  
      # load config
      cfg = Config.fromfile(args.config)
      init_default_scope(cfg.get("default_scope", "mmocr"))
      if args.cfg_options is not None:
          cfg.merge_from_dict(args.cfg_options)
  
      predictions = mmengine.load(args.pkl_results)
  
      evaluator = Evaluator(cfg.test_evaluator)
      eval_results = evaluator.offline_evaluate(predictions)
      print(json.dumps(eval_results))
  
imports: import argparse
  import json
  import mmengine
  from mmengine.config import Config, DictAction
  from mmengine.evaluator import Evaluator
  from mmengine.registry import init_default_scope
label_desc: Use image node_id 2 for calling a global function with example usage: main() without return types