code: def insert_text_to_token(master_token_list, match_text_dict):
      """
      Insert OCR text result to structure token.
      :param master_token_list:
      :param match_text_dict:
      :return:
      """
      master_token_list = merge_span_token(master_token_list)
      merged_result_list = []
      text_count = 0
      for master_token in master_token_list:
          if master_token.startswith("<td"):
              if text_count > len(match_text_dict) - 1:
                  text_count += 1
                  continue
              elif text_count not in match_text_dict.keys():
                  text_count += 1
                  continue
              else:
                  master_token = master_token.replace(
                      "><", ">{}<".format(match_text_dict[text_count])
                  )
                  text_count += 1
          master_token = deal_eb_token(master_token)
          merged_result_list.append(master_token)
  
      return "".join(merged_result_list)
  
imports: import os
  import re
  import cv2
  import glob
  import copy
  import math
  import pickle
  import numpy
  from shapely.geometry import Polygon, MultiPoint
label_desc: Use image node_id 25 for calling a global function with example usage: insert_text_to_token(master_token_list, match_text_dict) and returns: str