code: def tangents(P, n):
      assert n >= 2
      Q = []
      T = []
      for k in range(0, n - 1):
          q = P[k + 1] - P[k]
          t = q / sqrt(q.dot(q))
          Q.append(q)
          T.append(t)
      T.append(t)
      return Q, T
  
file_path: pygraphistry/graphistry/layout/utils/geometry.py
imports: from numpy import array, cos, sin
  from math import atan2, sqrt
label_desc: Use image node_id 6 for calling a global function with example usage: tangents(P, n) and returns: Q,  T