code: def __init__(self, config, ser_config):
      global_config = config["Global"]
      if "infer_mode" in global_config:
          ser_config["Global"]["infer_mode"] = global_config[
              "infer_mode"
          ]
  
      self.ser_engine = SerPredictor(ser_config)
  
      #  init re model
  
      # build post process
      self.post_process_class = build_post_process(
          config["PostProcess"], global_config
      )
  
      # build model
      self.model = build_model(config["Architecture"])
  
      load_model(
          config,
          self.model,
          model_type=config["Architecture"]["model_type"],
      )
  
      self.model.eval()
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import os
  import sys
  import cv2
  import json
  import paddle
  import paddle.distributed
  from ppocr.data import create_operators, transform
  from ppocr.modeling.architectures import build_model
  from ppocr.postprocess import build_post_process
  from ppocr.utils.save_load import load_model
  from ppocr.utils.visual import draw_re_results
  from ppocr.utils.logging import get_logger
  from ppocr.utils.utility import get_image_file_list, load_vqa_bio_label_maps, print_dict
  from tools.program import ArgsParser, load_config, merge_config
  from tools.infer_kie_token_ser import SerPredictor
label_desc: Use image node_id 1 to create a new SerRePredictor object from inherited base classes: object with example: obj = SerRePredictor(config, ser_config)