code: def _gen_point(p1, p2, new_distance):
      from .geometry import new_point_at_distance
  
      initial_distance = distance = sqrt(
          (p2[0] - p1[0]) ** 2 + (p2[1] - p1[1]) ** 2
      )
      if initial_distance < 1e-10:
          return None
      if distance > new_distance:
          distance = distance - new_distance
      else:
          return None
      angle = angle_between_vectors(p1, p2)
      new = new_point_at_distance(p1, distance, angle)
      return new
  
file_path: pygraphistry/graphistry/layout/utils/routing.py
imports: from .geometry import rectangle_point_intersection, angle_between_vectors, sqrt
label_desc: Use image node_id 3 for calling a global function with example usage: _gen_point(p1, p2, new_distance) and returns: new, None, None