code: def poly2bezier(poly):
      poly = np.array(poly).reshape(-1, 2)
      points_num = len(poly)
      up_curve = poly[: points_num // 2]
      down_curve = poly[points_num // 2 :]
      up_bezier = curve2bezier(up_curve)
      down_bezier = curve2bezier(down_curve)
      up_bezier[0] = up_curve[0]
      up_bezier[-1] = up_curve[-1]
      down_bezier[0] = down_curve[0]
      down_bezier[-1] = down_curve[-1]
      return np.vstack((up_bezier, down_bezier)).flatten().tolist()
  
file_path: mmocr/projects/ABCNet/abcnet/utils/bezier_utils.py
imports: import numpy
  from scipy.special import comb
  from mmocr.utils.typing_utils import ArrayLike
label_desc: Use image node_id 6 for calling a global function with example usage: poly2bezier(poly) and returns: np