docstr: Generate center line by poly clock-wise point.
docstr_tok: ["Generate","center","line","by","poly","clock-wise","point","."]
code: def poly2tcl(self, poly, ratio):
      """
      Generate center line by poly clock-wise point.
      """
      ratio_pair = np.array(
          [[0.5 - ratio / 2], [0.5 + ratio / 2]], dtype=np.float32
      )
      tcl_poly = np.zeros_like(poly)
      point_num = poly.shape[0]
  
      for idx in range(point_num // 2):
          point_pair = (
              poly[idx]
              + (poly[point_num - 1 - idx] - poly[idx]) * ratio_pair
          )
          tcl_poly[idx] = point_pair[0]
          tcl_poly[point_num - 1 - idx] = point_pair[1]
      return tcl_poly
  
imports: import math
  import cv2
  import numpy
  from skimage.morphology._skeletonize import thin
  from ppocr.utils.e2e_utils.extract_textpoint_fast import sort_and_expand_with_direction_v2
label_desc: Use image node_id 23 for calling the PGProcessTrain obj's underlying member method code with example usage: obj.poly2tcl(poly, ratio) and returns: tcl_poly