code: def testCustomCholeskyFn(self):
      def test_cholesky(x):
          return tf.linalg.cholesky(
              tf.linalg.set_diag(x, tf.linalg.diag_part(x) + 3.0)
          )
  
      # Make sure the points are far away so that this is roughly diagonal.
      index_points = np.array([-100.0, -50.0, 50.0, 100])[
          ..., np.newaxis
      ]
  
      gp = gaussian_process.GaussianProcess(
          kernel=psd_kernels.ExponentiatedQuadratic(),
          index_points=index_points,
          cholesky_fn=test_cholesky,
          validate_args=True,
      )
  
      # Roughly, the kernel matrix will look like the identity matrix.
      # When we add 3 to the diagonal, this leads to 2's on the diagonal
      # for the cholesky factor.
      self.assertAllClose(
          2 * np.ones([4], dtype=np.float64),
          gp.get_marginal_distribution().stddev(),
      )
  
imports: from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import gaussian_process
  from tensorflow_probability.python.distributions import gaussian_process_regression_model
  from tensorflow_probability.python.distributions import mvn_diag
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
  from tensorflow_probability.python.math import psd_kernels
  from tensorflow_probability.python.math.psd_kernels.internal import test_util
label_desc: Use image node_id 7 for calling the _GaussianProcessTest obj's underlying member method code with example usage: obj.testCustomCholeskyFn() and returns: tf