class_docstr: The post process for SAST.
docstr: Cluster pixels in tcl_map based on quads.
docstr_tok: ["Cluster","pixels","in","tcl_map","based","on","quads","."]
code: def cluster_by_quads_tco(
      self, tcl_map, tcl_map_thresh, quads, tco_map
  ):
      """
      Cluster pixels in tcl_map based on quads.
      """
      instance_count = quads.shape[0] + 1  # contain background
      instance_label_map = np.zeros(tcl_map.shape[:2], dtype=np.int32)
      if instance_count == 1:
          return instance_count, instance_label_map
  
      # predict text center
      xy_text = np.argwhere(tcl_map[:, :, 0] > tcl_map_thresh)
      n = xy_text.shape[0]
      xy_text = xy_text[:, ::-1]  # (n, 2)
      tco = tco_map[xy_text[:, 1], xy_text[:, 0], :]  # (n, 2)
      pred_tc = xy_text - tco
  
      # get gt text center
      m = quads.shape[0]
      gt_tc = np.mean(quads, axis=1)  # (m, 2)
  
      pred_tc_tile = np.tile(
          pred_tc[:, np.newaxis, :], (1, m, 1)
      )  # (n, m, 2)
      gt_tc_tile = np.tile(
          gt_tc[np.newaxis, :, :], (n, 1, 1)
      )  # (n, m, 2)
      dist_mat = np.linalg.norm(
          pred_tc_tile - gt_tc_tile, axis=2
      )  # (n, m)
      xy_text_assign = np.argmin(dist_mat, axis=1) + 1  # (n,)
  
      instance_label_map[xy_text[:, 1], xy_text[:, 0]] = xy_text_assign
      return instance_count, instance_label_map
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import sys
  import numpy
  from .locality_aware_nms import nms_locality
  import paddle
  import cv2
  import time
label_desc: Use image node_id 8 for calling the SASTPostProcess obj's underlying member method code with example usage: obj.cluster_by_quads_tco(tcl_map, tcl_map_thresh, quads, tco_map) and returns: instance_count,  instance_label_map, instance_count,  instance_label_map