code: def vectors_between_pts(pts=[]):
      '''Return vectors between points on N dimensions.
  Last vector is the path between the first and last point, creating a loop.
      '''
      assert isinstance(pts, list) and len(pts) > 0
      l_pts = len(pts)
      l_pt_prev = None
      for pt in pts:
          assert isinstance(pt, tuple)
          l_pt = len(pt)
          assert l_pt > 1
          for i in pt:
              assert isinstance(i, float)
          if l_pt_prev is not None:
              assert l_pt == l_pt_prev
          l_pt_prev = l_pt
  
      return [tuple([pts[(i+1) % l_pts][j] - pts[i][j] for j in range(l_pt)]) \
              for i in range(l_pts)f vectors_between_pts(pts=[]):
      '''Return vectors between points on N dimensions.
  Last vector is the path between the first and last point, creating a loop.
      '''
      assert isinstance(pts, list) and len(pts) > 0
      l_pts = len(pts)
      l_pt_prev = None
      for pt in pts:
          assert isinstance(pt, tuple)
          l_pt = len(pt)
          assert l_pt > 1
          for i in pt:
              assert isinstance(i, float)
          if l_pt_prev is not None:
              assert l_pt == l_pt_prev
          l_pt_prev = l_pt
  
      return [tuple([pts[(i+1) % l_pts][j] - pts[i][j] for j in range(l_pt)]) \
              for i in range(l_pts)]
docs: Return vectors between points on N dimensions.
  Last vector is the path between the first and last point, creating a loop.