code: def testMultivariateNormalNd(
      self, event_size=32, batch_size=8, num_steps=2
  ):
      tf.set_random_seed(3)
      with tf.device(FLAGS.test_device):
          f = run_nuts_chain(event_size, batch_size, num_steps)
          f = tf.function(f, autograph=False, jit_compile=True)
          samples, leapfrogs = self.evaluate(f())
  
      # TODO(axch) Figure out what the right thing to test about the leapfrog
      # count really is and test it, instead of just flailing around like this
      # does.
      print(type(samples), type(leapfrogs))
      print(samples, leapfrogs)
      ev_leapfrogs = leapfrogs[0]
      self.assertGreater(len(set(ev_leapfrogs.tolist())), 1)
      self.assertTrue(all(ev_leapfrogs > 1))
  
file_path: probability/tensorflow_probability/python/experimental/mcmc/nuts_autobatching_xla_test.py
imports: from absl import flags
  import numpy
  import tensorflow.compat.v1
  from tensorflow_probability.python.distributions import mvn_diag
  from tensorflow_probability.python.experimental.auto_batching import tf_backend
  from tensorflow_probability.python.experimental.mcmc import nuts_autobatching
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.mcmc import nuts
  from tensorflow_probability.python.mcmc import sample
label_desc: Use image node_id 1 for calling the NutsXLATest obj's underlying member method code with example usage: obj.testMultivariateNormalNd(event_size, batch_size, num_steps) without return types