code: def reduce_repeat_bb(text_list, break_token):
      """
      convert ['<b>Local</b>', '<b>government</b>', '<b>unit</b>'] to ['<b>Local government unit</b>']
      PS: maybe style <i>Local</i> is also exist, too. it can be processed like this.
      :param text_list:
      :param break_token:
      :return:
      """
      count = 0
      for text in text_list:
          if text.startswith("<b>"):
              count += 1
      if count == len(text_list):
          new_text_list = []
          for text in text_list:
              text = text.replace("<b>", "").replace("</b>", "")
              new_text_list.append(text)
          return ["<b>" + break_token.join(new_text_list) + "</b>"]
      else:
          return text_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 21 for calling a global function with example usage: reduce_repeat_bb(text_list, break_token) and returns: list, text_list