code: def route_with_lines(e, pts):
      """
      Basic edge routing with lines. The layout pass has already provided to list of points through which
      the edge shall be drawn. We just compute the position where to adjust the tail and head.
  
      """
      assert hasattr(e, "view")
      tail_pos = rectangle_point_intersection(e.v[0].view, p=pts[1])
      head_pos = rectangle_point_intersection(e.v[1].view, p=pts[-2])
      pts[0] = tail_pos
      pts[-1] = head_pos
      e.view.head_angle = angle_between_vectors(pts[-2], pts[-1])
  
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 1 for calling a global function with example usage: route_with_lines(e, pts) without return types