docstr: Split poly into quads.
docstr_tok: ["Split","poly","into","quads","."]
code: def poly2quads(self, poly):
      """
      Split poly into quads.
      """
      quad_list = []
      point_num = poly.shape[0]
  
      # point pair
      point_pair_list = []
      for idx in range(point_num // 2):
          point_pair = [poly[idx], poly[point_num - 1 - idx]]
          point_pair_list.append(point_pair)
  
      quad_num = point_num // 2 - 1
      for idx in range(quad_num):
          # reshape and adjust to clock-wise
          quad_list.append(
              (np.array(point_pair_list)[[idx, idx + 1]]).reshape(4, 2)[
                  [0, 2, 3, 1]
              ]
          )
  
      return np.array(quad_list)
  
imports: import math
  import cv2
  import numpy
  import json
  import sys
  import os
label_desc: Use image node_id 22 for calling the SASTProcessTrain obj's underlying member method code with example usage: obj.poly2quads(poly) and returns: np