code: def test_extrapolation(self):
      interpolation_times = [0.5, 35.0]
  
      reference_times = [1.0, 2.0, 6.0, 8.0, 18.0, 30.0]
      reference_yields = [0.01, 0.02, 0.015, 0.014, 0.02, 0.025]
      result = self.evaluate(
          constant_fwd_interpolation.interpolate(
              interpolation_times, reference_times, reference_yields
          )
      )
      expected_result = np.array([0.01, 0.025])
      np.testing.assert_allclose(result, expected_result, atol=1e-6)
  
file_path: tf-quant-finance/tf_quant_finance/rates/constant_fwd/constant_fwd_interpolation_test.py
imports: from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  from tensorflow.python.framework import test_util
  from tf_quant_finance.rates.constant_fwd import constant_fwd_interpolation
label_desc: Use image node_id 2 for calling the ConstantFwdInterpolationTest obj's underlying member method code with example usage: obj.test_extrapolation() without return types