code: def load_json_info(gt_file, img_info):
      """Collect the annotation information.
  
      Args:
          gt_file (str): The path to ground-truth
          img_info (dict): The dict of the img and annotation information
  
      Returns:
          img_info (dict): The dict of the img and annotation information
      """
  
      annotation = mmengine.load(gt_file)
      anno_info = []
      for form in annotation["form"]:
          for ann in form["words"]:
              iscrowd = 1 if len(ann["text"]) == 0 else 0
  
              x1, y1, x2, y2 = ann["box"]
              x = max(0, min(math.floor(x1), math.floor(x2)))
              y = max(0, min(math.floor(y1), math.floor(y2)))
              w, h = math.ceil(abs(x2 - x1)), math.ceil(abs(y2 - y1))
              bbox = [x, y, w, h]
              segmentation = [x, y, x + w, y, x + w, y + h, x, y + h]
  
              anno = dict(
                  iscrowd=iscrowd,
                  category_id=1,
                  bbox=bbox,
                  area=w * h,
                  segmentation=[segmentation],
              )
              anno_info.append(anno)
  
      img_info.update(anno_info=anno_info)
  
      return img_info
  
file_path: mmocr/tools/dataset_converters/textdet/funsd_converter.py
imports: import argparse
  import math
  import os
  import os.path
  import mmcv
  import mmengine
  from mmocr.utils import dump_ocr_data
label_desc: Use image node_id 4 for calling a global function with example usage: load_json_info(gt_file, img_info) and returns: img_info