code: def points_complex_vector(points):
      vector = []
      if not points:
          return vector
      points = [complex(*pt) for pt, _ in points]
      n = len(points)
      assert _NUM_ITEMS_PER_POINTS_COMPLEX_VECTOR == 4
      points.extend(points[: _NUM_ITEMS_PER_POINTS_COMPLEX_VECTOR - 1])
      while len(points) < _NUM_ITEMS_PER_POINTS_COMPLEX_VECTOR:
          points.extend(
              points[: _NUM_ITEMS_PER_POINTS_COMPLEX_VECTOR - 1]
          )
      for i in range(n):
          # The weights are magic numbers.
  
          # The point itself
          p0 = points[i]
          vector.append(p0)
  
          # The vector to the next point
          p1 = points[i + 1]
          d0 = p1 - p0
          vector.append(d0 * 3)
  
          # The turn vector
          p2 = points[i + 2]
          d1 = p2 - p1
          vector.append(d1 - d0)
  
          # The angle to the next point, as a cross product;
          # Square root of, to match dimentionality of distance.
          cross = d0.real * d1.imag - d0.imag * d1.real
          cross = copysign(sqrt(abs(cross)), cross)
          vector.append(cross * 4)
  
      return vector
  
imports: from fontTools.ttLib.ttGlyphSet import LerpGlyphSet
  from fontTools.pens.basePen import AbstractPen, BasePen, DecomposingPen
  from fontTools.pens.pointPen import AbstractPointPen, SegmentToPointPen
  from fontTools.pens.recordingPen import RecordingPen, DecomposingRecordingPen
  from fontTools.misc.transform import Transform
  from collections import defaultdict, deque
  from math import sqrt, copysign, atan2, pi
  from enum import Enum
  import itertools
  import logging
label_desc: Use image node_id 12 for calling a global function with example usage: points_complex_vector(points) and returns: vector, vector