docstr: Tests discount bond price computation.
docstr_tok: ["Tests","discount","bond","price","computation","."]
code: def test_correctness_discount_bond_price(
      self, dim, mr, vol, corr, times, expected
  ):
      """Tests discount bond price computation."""
      dtype = np.float64
      process = tff.models.hjm.GaussianHJM(
          dim=dim,
          mean_reversion=mr,
          volatility=vol,
          initial_discount_rate_fn=self.instant_forward_rate,
          corr_matrix=corr,
          dtype=dtype,
      )
      x_t = 0.01 * np.ones(shape=(len(times), dim))
      times = np.array(times)
      bond_prices = self.evaluate(
          process.discount_bond_price(x_t, times, times + 1.0)
      )
      self.assertAllEqual(bond_prices.shape, times.shape)
      self.assertAllClose(expected, bond_prices, 1e-8, 1e-8)
  
file_path: tf-quant-finance/tf_quant_finance/models/hjm/gaussian_hjm_test.py
imports: from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  import tf_quant_finance
  from tensorflow.python.framework import test_util
label_desc: Use image node_id 4 for calling the GaussianHJMModelTest obj's underlying member method code with example usage: obj.test_correctness_discount_bond_price(dim, mr, vol, corr, times, expected) without return types