docstr: Generate shrink_quad_along_width.
docstr_tok: ["Generate","shrink_quad_along_width","."]
code: def shrink_quad_along_width(
      self, quad, begin_width_ratio=0.0, end_width_ratio=1.0
  ):
      """
      Generate shrink_quad_along_width.
      """
      ratio_pair = np.array(
          [[begin_width_ratio], [end_width_ratio]], dtype=np.float32
      )
      p0_1 = quad[0] + (quad[1] - quad[0]) * ratio_pair
      p3_2 = quad[3] + (quad[2] - quad[3]) * ratio_pair
      return np.array([p0_1[0], p0_1[1], p3_2[1], p3_2[0]])
  
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 14 for calling the PGProcessTrain obj's underlying member method code with example usage: obj.shrink_quad_along_width(quad, begin_width_ratio, end_width_ratio) and returns: np