docstr: Tests that join of Hull White is the same as VectorHullWhite.
code: def test_join_hull_white(self):
      """Tests that join of Hull White is the same as VectorHullWhite."""
      tf.random.set_seed(42)  # Fix global random seed
      dtype = np.float64
      instant_forward_rate_fn_1 = lambda t: 2 * [0.2]
      process_1 = tff.models.hull_white.VectorHullWhiteModel(
          dim=2,
          mean_reversion=[0.1, 0.2],
          volatility=[0.1, 0.2],
          initial_discount_rate_fn=instant_forward_rate_fn_1,
          dtype=dtype,
      )
      instant_forward_rate_fn_2 = lambda t: 3 * [0.1]
      process_2 = tff.models.hull_white.VectorHullWhiteModel(
          dim=3,
          mean_reversion=[0.3, 0.4, 0.5],
          volatility=[0.1, 0.1, 0.1],
          initial_discount_rate_fn=instant_forward_rate_fn_2,
          dtype=dtype,
      )
      # Correlation structure
      corr_1 = [[1.0, 0.3, 0.2], [0.3, 1.0, 0.5], [0.2, 0.5, 1.0]]
  
      def corr_2(t):
          del t
          return [[1.0, 0.1], [0.1, 1.0]]
  
      matrices = [corr_1, corr_2]
      process_join = tff.models.JoinedItoProcess(
          [process_1, process_2], matrices
      )
      expected_corr_matrix = np.array(
          [
              [1.0, 0.3, 0.2, 0.0, 0.0],
              [0.3, 1.0, 0.5, 0.0, 0.0],
              [0.2, 0.5, 1.0, 0.0, 0.0],
              [0.0, 0.0, 0.0, 1.0, 0.1],
              [0.0, 0.0, 0.0, 0.1, 1.0],
          ]
      )
      expected_mean = [
          0.0109434,
          0.02356047,
          0.01500711,
          0.01915375,
          0.0230985,
      ]
      expected_var = [
          0.00475813,
          0.01812692,
          0.0043197,
          0.004121,
          0.00393469,
      ]
      num_samples = 110000
      samples = process_join.sample_paths(
          times=[0.1, 0.5],
          time_step=0.01,
          num_samples=num_samples,
          random_type=tff.math.random.RandomType.PSEUDO_ANTITHETIC,
          seed=42,
      )
      self.assertEqual(samples.dtype, dtype)
      self.assertEqual(samples.shape, [num_samples, 2, 5])
      samples = self.evaluate(samples)
      self.assertAllClose(
          np.corrcoef(samples[:, -1, :], rowvar=False),
          expected_corr_matrix,
          rtol=1e-2,
          atol=1e-2,
      )
      self.assertAllClose(
          np.mean(samples[:, -1, :], axis=0),
          expected_mean,
          rtol=1e-3,
          atol=1e-3,
      )
      self.assertAllClose(
          np.var(samples[:, -1, :], axis=0),
          expected_var,
          rtol=1e-3,
          atol=1e-3,
      )
  
file_path: tf-quant-finance/tf_quant_finance/models/joined_ito_process_test.py
imports: import numpy
  import tensorflow.compat.v2
  import tf_quant_finance
  from tensorflow.python.framework import test_util
label_desc: Use image node_id 1 for calling the JoinedItoProcessTest obj's underlying member method code with example usage: obj.test_join_hull_white() and returns: list