code: def test_covariance_before_transformation(self):
      fake_kernel = test_fixtures.TestTransitionKernel(
          target_log_prob_fn=lambda x: -(x**2) / 2
      )
      cov_reducer = covariance_reducer.CovarianceReducer()
      reducer_kernel = with_reductions.WithReductions(
          inner_kernel=fake_kernel,
          reducer=cov_reducer,
      )
      kernel = transformed_kernel.TransformedTransitionKernel(
          inner_kernel=reducer_kernel,
          bijector=exp.Exp(),
      )
      samples, _, kernel_results = sample.sample_chain(
          num_results=10,
          current_state=1.0,
          kernel=kernel,
          trace_fn=None,
          return_final_kernel_results=True,
          seed=test_util.test_seed(),
      )
      samples, final_cov = self.evaluate(
          [
              samples,
              cov_reducer.finalize(
                  kernel_results.inner_results.reduction_results
              ),
          ]
      )
      self.assertAllClose(
          np.mean(np.log(samples), axis=0),
          kernel_results.inner_results.reduction_results.cov_state.mean,
          rtol=1e-6,
      )
      self.assertAllClose(
          np.cov(np.log(samples).T, ddof=0), final_cov, rtol=1e-6
      )
  
imports: from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import exp
  from tensorflow_probability.python.distributions import mvn_diag
  from tensorflow_probability.python.distributions import mvn_tril
  from tensorflow_probability.python.experimental.mcmc import covariance_reducer
  from tensorflow_probability.python.experimental.mcmc import step
  from tensorflow_probability.python.experimental.mcmc import with_reductions
  from tensorflow_probability.python.experimental.mcmc.internal import test_fixtures
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.mcmc import hmc
  from tensorflow_probability.python.mcmc import sample
  from tensorflow_probability.python.mcmc import simple_step_size_adaptation
  from tensorflow_probability.python.mcmc import transformed_kernel
label_desc: Use image node_id 6 for calling the CovarianceWithReductionsTest obj's underlying member method code with example usage: obj.test_covariance_before_transformation() without return types