code: def _fourth_order_interpolation_coefficients(
      y0, y1, y_mid, f0, f1, dt
  ):
      """Fits coefficients for 4th order polynomial interpolation.
  
      Args:
        y0: state value at the start of the interval.
        y1: state value at the end of the interval.
        y_mid: state value at the mid-point of the interval.
        f0: state derivative value at the start of the interval.
        f1: state derivative value at the end of the interval.
        dt: width of the interval.
  
      Returns:
        coefficients: List of coefficients `[a, b, c, d, e]` for interpolating with
          the polynomial `p = a * x ** 4 + b * x ** 3 + c * x ** 2 + d * x + e` for
          values of `x` between 0 (start of interval) and 1 (end of interval).
      """
      # Formulas for interpolation coefficients were computed as follows:
      # ```None
      # a, b, c, d, e = sympy.symbols('a b c d e')
      # x, dt, y0, y1, y_mid, f0, f1 = sympy.symbols('x dt y0 y1 y_mid f0 f1')
      # p = a * x ** 4 + b * x ** 3 + c * x ** 2 + d * x + e
      # sympy.solve([p.subs(x, 0) - y0,
      #              p.subs(x, 1 / 2) - y_mid,
      #              p.subs(x, 1) - y1,
      #              (p.diff(x) / dt).subs(x, 0) - f0,
      #              (p.diff(x) / dt).subs(x, 1) - f1],
      #             [a, b, c, d, e])
      # {a: -2.0*dt*f0 + 2.0*dt*f1 - 8.0*y0 - 8.0*y1 + 16.0*y_mid,
      #  b: 5.0*dt*f0 - 3.0*dt*f1 + 18.0*y0 + 14.0*y1 - 32.0*y_mid,
      #  c: -4.0*dt*f0 + dt*f1 - 11.0*y0 - 5.0*y1 + 16.0*y_mid,
      #  d: dt*f0,
      #  e: y0}
      #  ```
      with tf.name_scope("interpolation_coefficients"):
          a = weighted_sum(
              [-2 * dt, 2 * dt, -8, -8, 16], [f0, f1, y0, y1, y_mid]
          )
          b = weighted_sum(
              [5 * dt, -3 * dt, 18, 14, -32], [f0, f1, y0, y1, y_mid]
          )
          c = weighted_sum(
              [-4 * dt, dt, -11, -5, 16], [f0, f1, y0, y1, y_mid]
          )
          d = weighted_sum([dt], [f0])
          e = y0
      return [a, b, c, d, e]
  
file_path: probability/tensorflow_probability/python/math/ode/runge_kutta_util.py
imports: import collections
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import prefer_static
label_desc: Use image node_id 7 for calling a global function with example usage: _fourth_order_interpolation_coefficients(y0, y1, y_mid, f0, f1, dt) and returns: list