code: def testValuesAreCorrect(self, feature_ndims, dims):
      np.random.seed(42)
      num_obs = 5
      num_x = 3
      num_y = 3
  
      shape = [dims] * feature_ndims
  
      base_kernel = exponentiated_quadratic.ExponentiatedQuadratic(
          np.float64(5.0), np.float64(0.2), feature_ndims=feature_ndims
      )
  
      fixed_inputs = np.random.uniform(
          -1.0, 1.0, size=[num_obs] + shape
      )
  
      k = schur_complement.SchurComplement(
          base_kernel=base_kernel, fixed_inputs=fixed_inputs
      )
  
      k_obs = self.evaluate(
          base_kernel.matrix(fixed_inputs, fixed_inputs)
      )
  
      k_obs_chol_linop = tf.linalg.LinearOperatorLowerTriangular(
          tf.linalg.cholesky(k_obs)
      )
      for _ in range(5):
          x = np.random.uniform(-1, 1, size=[num_x] + shape)
          y = np.random.uniform(-1, 1, size=[num_y] + shape)
  
          k_x_y = self.evaluate(base_kernel.apply(x, y))
          k_x_obs = self.evaluate(base_kernel.matrix(x, fixed_inputs))
          k_obs_y = self.evaluate(base_kernel.matrix(y, fixed_inputs))
  
          k_x_obs = np.expand_dims(k_x_obs, -2)
          k_obs_y = np.expand_dims(k_obs_y, -1)
  
          k_obs_inv_k_obs_y = self.evaluate(
              k_obs_chol_linop.solve(
                  k_obs_chol_linop.solve(k_obs_y), adjoint=True
              )
          )
  
          cov_dec = np.einsum(
              "ijk,ikl->ijl", k_x_obs, k_obs_inv_k_obs_y
          )
          cov_dec = cov_dec[
              ..., 0, 0
          ]  # np.squeeze didn't like list of axes
          expected = k_x_y - cov_dec
          self.assertAllClose(expected, self.evaluate(k.apply(x, y)))
  
imports: import functools
  import itertools
  from unittest import mock
  from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import cholesky_util
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
  from tensorflow_probability.python.math.psd_kernels import exponentiated_quadratic
  from tensorflow_probability.python.math.psd_kernels import schur_complement
  from tensorflow_probability.python.math.psd_kernels.internal import test_util
label_desc: Use image node_id 2 for calling the SchurComplementTest obj's underlying member method code with example usage: obj.testValuesAreCorrect(feature_ndims, dims) without return types