class_docstr: Generate the ground truth targets of FCENet: Fourier Contour Embedding
  for Arbitrary-Shaped Text Detection.
  
  [https://arxiv.org/abs/2104.10442]
  
  Args:
      fourier_degree (int): The maximum Fourier transform degree k.
      resample_step (float): The step size for resampling the text center
          line (TCL). It's better not to exceed half of the minimum width.
      center_region_shrink_ratio (float): The shrink ratio of text center
          region.
      level_size_divisors (tuple(int)): The downsample ratio on each level.
      level_proportion_range (tuple(tuple(int))): The range of text sizes
          assigned to each level.
docstr: Get the respective points composing head edge, tail edge, top
  sideline and bottom sideline.
  
  Args:
      points (ndarray): The points composing a text polygon.
  
  Returns:
      head_edge (ndarray): The two points composing the head edge of text
          polygon.
      tail_edge (ndarray): The two points composing the tail edge of text
          polygon.
      top_sideline (ndarray): The points composing top curved sideline of
          text polygon.
      bot_sideline (ndarray): The points composing bottom curved sideline
          of text polygon.
docstr_tok: ["Get","the","respective","points","composing","head","edge",",","tail","edge",",","top","sideline","and","bottom","sideline",".","Args",":","points","(","ndarray",")",":","The","points","composing","a","text","polygon",".","Returns",":","head_edge","(","ndarray",")",":","The","two","points","composing","the","head","edge","of","text","polygon",".","tail_edge","(","ndarray",")",":","The","two","points","composing","the","tail","edge","of","text","polygon",".","top_sideline","(","ndarray",")",":","The","points","composing","top","curved","sideline","of","text","polygon",".","bot_sideline","(","ndarray",")",":","The","points","composing","bottom","curved","sideline","of","text","polygon","."]
code: def reorder_poly_edge(self, points):
      """Get the respective points composing head edge, tail edge, top
      sideline and bottom sideline.
  
      Args:
          points (ndarray): The points composing a text polygon.
  
      Returns:
          head_edge (ndarray): The two points composing the head edge of text
              polygon.
          tail_edge (ndarray): The two points composing the tail edge of text
              polygon.
          top_sideline (ndarray): The points composing top curved sideline of
              text polygon.
          bot_sideline (ndarray): The points composing bottom curved sideline
              of text polygon.
      """
  
      assert points.ndim == 2
      assert points.shape[0] >= 4
      assert points.shape[1] == 2
  
      head_inds, tail_inds = self.find_head_tail(
          points, self.orientation_thr
      )
      head_edge, tail_edge = points[head_inds], points[tail_inds]
  
      pad_points = np.vstack([points, points])
      if tail_inds[1] < 1:
          tail_inds[1] = len(points)
      sideline1 = pad_points[head_inds[1] : tail_inds[1]]
      sideline2 = pad_points[
          tail_inds[1] : (head_inds[1] + len(points))
      ]
      sideline_mean_shift = np.mean(sideline1, axis=0) - np.mean(
          sideline2, axis=0
      )
  
      if sideline_mean_shift[1] > 0:
          top_sideline, bot_sideline = sideline2, sideline1
      else:
          top_sideline, bot_sideline = sideline1, sideline2
  
      return head_edge, tail_edge, top_sideline, bot_sideline
  
imports: import cv2
  import numpy
  from numpy.fft import fft
  from numpy.linalg import norm
  import sys
label_desc: Use image node_id 4 for calling the FCENetTargets obj's underlying member method code with example usage: obj.reorder_poly_edge(points) and returns: head_edge,  tail_edge,  top_sideline,  bot_sideline