code: def parse_line(line, format):
      if format == "txt":
          img_name, text = line.split(" ")
      else:
          line = json.loads(line)
          img_name = line["filename"]
          text = line["text"]
      return img_name, text
  
file_path: mmocr/tools/dataset_converters/textrecog/lmdb_converter.py
imports: import argparse
  import json
  import os
  import os.path
  import cv2
  import lmdb
  import numpy
  from mmocr.utils import list_from_file
label_desc: Use image node_id 1 for calling a global function with example usage: parse_line(line, format) and returns: img_name,  text