code: def test_interpolation_differentiable(self):
      dtype = tf.float64
      interval_times = tf.constant(
          [0.25, 0.5, 1.0, 2.0, 3.0], dtype=dtype
      )
      knot_1y = tf.constant([0.052], dtype=dtype)
      interval_values = tf.concat(
          [
              tf.constant([0.05, 0.051], dtype=dtype),
              knot_1y,
              tf.constant([0.053, 0.055], dtype=dtype),
          ],
          axis=0,
      )
      test_time = tf.constant([1.1, 2.7], dtype=dtype)
      interpolated, _ = monotone_convex.interpolate(
          test_time, interval_values, interval_times
      )
      gradient_1y = self.evaluate(
          tf.convert_to_tensor(
              tf.gradients(interpolated[0], knot_1y)[0]
          )
      )
      gradient_zero = self.evaluate(
          tf.convert_to_tensor(
              tf.gradients(interpolated[1], knot_1y)[0]
          )
      )
  
      self.assertAlmostEqual(gradient_1y[0], 0.42)
      self.assertAlmostEqual(gradient_zero[0], 0.0)
  
imports: from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  from tensorflow.python.framework import test_util
  from tf_quant_finance.rates.hagan_west import monotone_convex
label_desc: Use image node_id 4 for calling the MonotoneConvexTest obj's underlying member method code with example usage: obj.test_interpolation_differentiable() without return types