code: def testEigHMarginalFn(self):
      tol = 1e-5
      v1 = np.sqrt([0.5, 0.5])
      v2 = np.array(v1)
      v2[0] = -v2[0]
      vectors = np.array([v1, v2], dtype=np.float32).T
      values = np.array([-1.0, 0.5], dtype=np.float32)
      safe_values = np.where(values < tol, tol, values)
      input_matrix = np.dot(vectors, np.dot(np.diag(values), vectors.T))
      output_matrix = np.dot(
          vectors, np.dot(np.diag(safe_values), vectors.T)
      )
  
      marginal_fn = marginal_fns.make_eigh_marginal_fn(tol=tol)
      test = self.evaluate(
          marginal_fn(tf.zeros(2), input_matrix).covariance()
      )
      self.assertAllClose(test, output_matrix)
  
file_path: probability/tensorflow_probability/python/experimental/distributions/marginal_fns_test.py
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.experimental.distributions import marginal_fns
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
label_desc: Use image node_id 7 for calling the MarginalFnsTest obj's underlying member method code with example usage: obj.testEigHMarginalFn() without return types