code: def hermite_interpolate(
      x, y, precision=250, type="cardinal", c=None, b=None, t=None
  ):
      """
      Interpolate x, y using the hermite method.
      See https://en.wikipedia.org/wiki/Cubic_Hermite_spline
  
      This interpolation is configurable and contain 4 subtypes:
        * Catmull Rom
        * Finite Difference
        * Cardinal
        * Kochanek Bartels
  
      The cardinal subtype is customizable with a parameter:
        * c: tension (0, 1)
  
      This last type is also customizable using 3 parameters:
        * c: continuity (-1, 1)
        * b: bias       (-1, 1)
        * t: tension    (-1, 1)
  
      """
      n = len(x) - 1
      m = [1] * (n + 1)
      w = [1] * (n + 1)
      delta_x = [x2 - x1 for x1, x2 in zip(x, x[1:])]
      if type == "catmull_rom":
          type = "cardinal"
          c = 0
      if type == "finite_difference":
          for i in range(1, n):
              m[i] = w[i] = (
                  0.5
                  * (
                      (y[i + 1] - y[i]) / (x[i + 1] - x[i])
                      + (y[i] - y[i - 1]) / (x[i] - x[i - 1])
                  )
                  if x[i + 1] - x[i] and x[i] - x[i - 1]
                  else 0
              )
  
      elif type == "kochanek_bartels":
          c = c or 0
          b = b or 0
          t = t or 0
          for i in range(1, n):
              m[i] = 0.5 * (
                  (1 - t) * (1 + b) * (1 + c) * (y[i] - y[i - 1])
                  + (1 - t) * (1 - b) * (1 - c) * (y[i + 1] - y[i])
              )
              w[i] = 0.5 * (
                  (1 - t) * (1 + b) * (1 - c) * (y[i] - y[i - 1])
                  + (1 - t) * (1 - b) * (1 + c) * (y[i + 1] - y[i])
              )
  
      if type == "cardinal":
          c = c or 0
          for i in range(1, n):
              m[i] = w[i] = (
                  (1 - c)
                  * (y[i + 1] - y[i - 1])
                  / (x[i + 1] - x[i - 1])
                  if x[i + 1] - x[i - 1]
                  else 0
              )
  
      def p(i, x_):
          t = (x_ - x[i]) / delta_x[i]
          t2 = t * t
          t3 = t2 * t
  
          h00 = 2 * t3 - 3 * t2 + 1
          h10 = t3 - 2 * t2 + t
          h01 = -2 * t3 + 3 * t2
          h11 = t3 - t2
  
          return (
              h00 * y[i]
              + h10 * m[i] * delta_x[i]
              + h01 * y[i + 1]
              + h11 * w[i + 1] * delta_x[i]
          )
  
      for i in range(n + 1):
          yield x[i], y[i]
          if i == n or delta_x[i] == 0:
              continue
          for s in range(1, precision):
              X = x[i] + s * delta_x[i] / precision
              yield X, p(i, X)
  
imports: from __future__ import division
  from math import sin
label_desc: Use image node_id 3 for calling a global function with example usage: hermite_interpolate(x, y, precision, type, c, b, t) and returns: unknown