docstr: Checks the interpolation for flat curves.
docstr_tok: ["Checks","the","interpolation","for","flat","curves","."]
code: def test_interpolated_yields_flat_curve(self):
      """Checks the interpolation for flat curves."""
      dtypes = [np.float32, np.float64]
      for dtype in dtypes:
          reference_times = np.array(
              [0.3, 1.0, 1.43, 3.7, 9.2, 12.48], dtype=dtype
          )
          yields = np.array([8.0] * 6, dtype=dtype)
  
          # Times for which the interpolated values are required.
          interpolation_times = tf.constant(
              [
                  0.1,
                  1.1,
                  1.22,
                  0.45,
                  1.8,
                  3.8,
                  7.45,
                  7.73,
                  9.6,
                  11.7,
                  12.0,
              ],
              dtype=dtype,
          )
          expected = np.array([8.0] * 11, dtype=dtype)
          actual = self.evaluate(
              monotone_convex.interpolate_yields(
                  interpolation_times, reference_times, yields=yields
              )
          )
          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 11 for calling the MonotoneConvexTest obj's underlying member method code with example usage: obj.test_interpolated_yields_flat_curve() without return types