code: def _calc_project_in_line(point, line_point1, line_point2):
      eps = 1e-16
      m, n = point
      x1, y1 = line_point1
      x2, y2 = line_point2
      F = (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)
      x = (
          m * (x2 - x1) * (x2 - x1)
          + n * (y2 - y1) * (x2 - x1)
          + (x1 * y2 - x2 * y1) * (y2 - y1)
      ) / (F + eps)
      y = (
          m * (x2 - x1) * (y2 - y1)
          + n * (y2 - y1) * (y2 - y1)
          + (x2 * y1 - x1 * y2) * (x2 - x1)
      ) / (F + eps)
      return np.array([[x, y]])
  
file_path: PaddleSeg/EISeg/eiseg/util/regularization/rs_regularization.py
imports: import math
  import cv2
  import numpy
  from .utils import calc_distance
label_desc: Use image node_id 12 for calling a global function with example usage: _calc_project_in_line(point, line_point1, line_point2) and returns: np