code: def testReconstructMatrix(self, batch_shape, n_points, indices):
      matrices, eigvals, eigvecs = self.evaluate(
          kernel_over_unit_square(
              n_points, batch_shape=batch_shape, dtype=self.param_dtype
          )
      )
      if indices is not None:
          indices = np.array(indices, dtype=np.int32)
          one_hot_indices = tf.constant(
              [(1 if i in indices else 0) for i in range(n_points)],
              dtype=tf.int32,
          )
  
          expected = matrices[..., indices[:, np.newaxis], indices]
      else:
          one_hot_indices = None
          expected = matrices
  
      reconstructed = dpp_lib._reconstruct_matrix(
          tf.constant(eigvals), tf.constant(eigvecs), one_hot_indices
      )
      if indices is None:
          # When no indices are specified, we can also check the full matrix.
          self.assertAllClose(expected, reconstructed, rtol=1e-5)
      # logdet must always agree, even if shape does not.
      self.assertAllClose(
          np.linalg.slogdet(expected)[1],
          tf.linalg.logdet(reconstructed),
          rtol=1e-5,
          atol=1e-5,
      )
  
imports: import contextlib
  from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import bernoulli
  from tensorflow_probability.python.distributions import dpp
  from tensorflow_probability.python.distributions import uniform
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math.psd_kernels import exponentiated_quadratic
label_desc: Use image node_id 3 for calling the _DppTest obj's underlying member method code with example usage: obj.testReconstructMatrix(batch_shape, n_points, indices) without return types