code: def build_output_control_points(num_control_points, margins):
      margin_x, margin_y = margins
      num_ctrl_pts_per_side = num_control_points // 2
      ctrl_pts_x = np.linspace(
          margin_x, 1.0 - margin_x, num_ctrl_pts_per_side
      )
      ctrl_pts_y_top = np.ones(num_ctrl_pts_per_side) * margin_y
      ctrl_pts_y_bottom = np.ones(num_ctrl_pts_per_side) * (
          1.0 - margin_y
      )
      ctrl_pts_top = np.stack([ctrl_pts_x, ctrl_pts_y_top], axis=1)
      ctrl_pts_bottom = np.stack(
          [ctrl_pts_x, ctrl_pts_y_bottom], axis=1
      )
      output_ctrl_pts_arr = np.concatenate(
          [ctrl_pts_top, ctrl_pts_bottom], axis=0
      )
      output_ctrl_pts = paddle.to_tensor(output_ctrl_pts_arr)
      return output_ctrl_pts
  
file_path: PaddleOCR/ppocr/modeling/transforms/tps_spatial_transformer.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import math
  import paddle
  from paddle import nn, ParamAttr
  from paddle.nn import functional
  import numpy
  import itertools
label_desc: Use image node_id 3 for calling a global function with example usage: build_output_control_points(num_control_points, margins) and returns: output_ctrl_pts