code: def test_interpolated_forwards_with_yields(self):
      dtypes = [np.float32, np.float64]
      for dtype in dtypes:
          reference_times = np.array(
              [1.0, 2.0, 3.0, 4.0, 5.0], dtype=dtype
          )
          yields = (
              np.array([2.75, 4.0, 4.75, 5.0, 4.75], dtype=dtype) / 100
          )
  
          # Times for which the interpolated values are required.
          interpolation_times = np.array(
              [0.3, 1.3, 2.1, 4.5], dtype=dtype
          )
          actual = self.evaluate(
              monotone_convex.interpolate_forward_rate(
                  interpolation_times,
                  reference_times=reference_times,
                  yields=yields,
              )
          )
          expected = np.array(
              [0.0229375, 0.05010625, 0.0609, 0.03625], dtype=dtype
          )
          np.testing.assert_allclose(actual, expected, rtol=1e-5)
  
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 8 for calling the MonotoneConvexTest obj's underlying member method code with example usage: obj.test_interpolated_forwards_with_yields() without return types