code: def testBatchSlicePreservesPrecomputedDivisor(self):
      batch_shape = [4, 3]
      base_kernel = exponentiated_quadratic.ExponentiatedQuadratic(
          amplitude=self.evaluate(
              tf.exp(
                  samplers.normal(
                      batch_shape, seed=test_util.test_seed()
                  )
              )
          )
      )
      fixed_inputs = self.evaluate(
          samplers.normal(
              batch_shape + [1, 2], seed=test_util.test_seed()
          )
      )
      schur = schur_complement.SchurComplement(
          base_kernel, fixed_inputs
      )
      schur_with_divisor = (
          schur_complement.SchurComplement.with_precomputed_divisor(
              base_kernel, fixed_inputs
          )
      )
      self.assertAllEqual(schur.batch_shape, batch_shape)
      self.assertAllEqual(schur_with_divisor.batch_shape, batch_shape)
  
      schur_sliced = schur[tf.newaxis, 0, ..., -2:]
      schur_with_divisor_sliced = schur_with_divisor[
          tf.newaxis, 0, ..., -2:
      ]
      batch_shape_sliced = tf.ones(batch_shape)[
          tf.newaxis, 0, ..., -2:
      ].shape
      self.assertAllEqual(schur_sliced.batch_shape, batch_shape_sliced)
      self.assertAllEqual(
          schur_with_divisor_sliced.batch_shape, batch_shape_sliced
      )
      self.assertAllEqual(
          (
              schur_with_divisor_sliced._precomputed_divisor_matrix_cholesky.shape[
                  :-2
              ]
          ),
          batch_shape_sliced,
      )
  
      x = np.ones([1, 2], np.float32)
      y = np.ones([3, 2], np.float32)
      self.assertAllClose(
          schur_with_divisor.matrix(x, y), schur.matrix(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 12 for calling the SchurComplementTest obj's underlying member method code with example usage: obj.testBatchSlicePreservesPrecomputedDivisor() without return types