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
  import json
  import sys
  import os
label_desc: Use image node_id 20 for calling the SASTProcessTrain obj's underlying member method code with example usage: obj.poly2tcl(poly, ratio) and returns: tcl_poly