code: def nms_locality(polys, thres=0.3):
      """
      locality aware nms of EAST
      :param polys: a N*9 numpy array. first 8 coordinates, then prob
      :return: boxes after nms
      """
      S = []
      p = None
      for g in polys:
          if p is not None and intersection(g, p) > thres:
              p = weighted_merge(g, p)
          else:
              if p is not None:
                  S.append(p)
              p = g
      if p is not None:
          S.append(p)
  
      if len(S) == 0:
          return np.array([])
      return standard_nms(np.array(S), thres)
  
file_path: PaddleOCR/ppocr/postprocess/locality_aware_nms.py
imports: import numpy
  from shapely.geometry import Polygon
label_desc: Use image node_id 8 for calling a global function with example usage: nms_locality(polys, thres) and returns: standard_nms, np