class_docstr: More careful tests that sampling/preconditioning is actually working.
class_docstr_tok: ["More","careful","tests","that","sampling\/preconditioning","is","actually","working","."]
code: def test_correctness_with_200d_mvn_tril(self, precondition_scheme):
      # This is an almost complete check of the Gaussian case.
      dims = 200
      scale_wishart = wishart.WishartLinearOperator(
          # Important that df is just slightly bigger than dims. This makes the
          # scale_wishart ill condtioned. The result is that tests fail if we do
          # not handle transposes correctly.
          df=1.1 * dims,
          scale=tf.linalg.LinearOperatorIdentity(dims),
          input_output_cholesky=True,
          name="wishart_for_samples",
      )
  
      # evaluate right here to avoid working with a random target_mvn in graph
      # mode....that would cause issues, since we read off expected statistics
      # from looking at the mvn properties, so it would be bad if these properties
      # changed with every graph eval.
      scale_tril = self.evaluate(
          scale_wishart.sample(seed=test_util.test_seed())
      )
  
      target_mvn = mvn_tril.MultivariateNormalTriL(
          # Non-trivial "loc" ensures we do not rely on being centered at 0.
          loc=tf.range(0.0, dims),
          scale_tril=scale_tril,
      )
  
      self._check_correctness_of_moments_and_preconditioning(
          target_mvn,
          # Lots of results, to test tight tolerance.
          num_results=3000,
          precondition_scheme=precondition_scheme,
          asymptotic_step_size_rtol=(
              0.5
              if precondition_scheme == "no_preconditioner"
              else 0.25
          ),
      )
  
imports: import collections
  from absl.testing import parameterized
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import reshape
  from tensorflow_probability.python.bijectors import scale
  from tensorflow_probability.python.distributions import distribution
  from tensorflow_probability.python.distributions import independent
  from tensorflow_probability.python.distributions import joint_distribution_sequential
  from tensorflow_probability.python.distributions import mvn_diag
  from tensorflow_probability.python.distributions import mvn_linear_operator
  from tensorflow_probability.python.distributions import mvn_tril
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.distributions import wishart
  from tensorflow_probability.python.experimental.distributions import mvn_precision_factor_linop
  from tensorflow_probability.python.experimental.mcmc import preconditioned_hmc
  from tensorflow_probability.python.internal import auto_composite_tensor
  from tensorflow_probability.python.internal import distribute_lib
  from tensorflow_probability.python.internal import distribute_test_lib
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.internal import unnest
  from tensorflow_probability.python.mcmc import diagnostic
  from tensorflow_probability.python.mcmc import dual_averaging_step_size_adaptation
  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
  from tensorflow_probability.python.mcmc.internal import leapfrog_integrator
  from tensorflow_probability.python.stats import sample_stats
label_desc: Use image node_id 5 for calling the PreconditionedHMCCorrectnessTest obj's underlying member method code with example usage: obj.test_correctness_with_200d_mvn_tril(precondition_scheme) without return types