code: def testPrivateArgPreventsCholeskyRecomputation(self):
      df = np.float32(5.0)
      x = np.random.uniform(-1, 1, (4, 7)).astype(np.float32)
      x_obs = np.random.uniform(-1, 1, (4, 7)).astype(np.float32)
      y_obs = np.random.uniform(-1, 1, (4,)).astype(np.float32)
      chol = np.eye(4).astype(np.float32)
      mock_cholesky_fn = mock.Mock(return_value=chol)
      base_kernel = exponentiated_quadratic.ExponentiatedQuadratic()
      d = stprm.StudentTProcessRegressionModel.precompute_regression_model(
          df,
          base_kernel,
          index_points=x,
          observation_index_points=x_obs,
          observations=y_obs,
          cholesky_fn=mock_cholesky_fn,
      )
      mock_cholesky_fn.assert_called_once()
  
      mock_cholesky_fn.reset_mock()
      d2 = stprm.StudentTProcessRegressionModel.precompute_regression_model(
          df,
          base_kernel,
          index_points=x,
          observation_index_points=x_obs,
          observations=y_obs,
          cholesky_fn=mock_cholesky_fn,
          _precomputed_divisor_matrix_cholesky=(
              d._precomputed_divisor_matrix_cholesky
          ),
          _precomputed_solve_on_observation=d._precomputed_solve_on_observation,
      )
      mock_cholesky_fn.assert_not_called()
  
      # The Cholesky is computed just once in each call to log_prob (on the
      # index points kernel matrix).
      self.assertAllClose(d.log_prob(y_obs), d2.log_prob(y_obs))
      self.assertEqual(mock_cholesky_fn.call_count, 2)
  
imports: from unittest import mock
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import gaussian_process_regression_model
  from tensorflow_probability.python.distributions import student_t_process
  from tensorflow_probability.python.distributions import student_t_process_regression_model
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math.psd_kernels import exp_sin_squared
  from tensorflow_probability.python.math.psd_kernels import exponentiated_quadratic
  from tensorflow_probability.python.math.psd_kernels.internal import test_util
label_desc: Use image node_id 9 for calling the StudentTProcessRegressionModelTest obj's underlying member method code with example usage: obj.testPrivateArgPreventsCholeskyRecomputation() without return types