docstr: Tests the long-term energy conservation of the leapfrog integrator.
  
  The leapfrog integrator is symplectic, so for sufficiently small step
  sizes it should be possible to run it more or less indefinitely without
  the energy of the system blowing up or collapsing.
  
  Args:
    independent_chain_ndims: Python `int` scalar representing the number of
      dims associated with independent chains.
docstr_tok: ["Tests","the","long-term","energy","conservation","of","the","leapfrog","integrator",".","The","leapfrog","integrator","is","symplectic",",","so","for","sufficiently","small","step","sizes","it","should","be","possible","to","run","it","more","or","less","indefinitely","without","the","energy","of","the","system","blowing","up","or","collapsing",".","Args",":","independent_chain_ndims",":","Python","`","int","`","scalar","representing","the","number","of","dims","associated","with","independent","chains","."]
code: def _integrator_conserves_energy_wrapper(
      self, independent_chain_ndims
  ):
      """Tests the long-term energy conservation of the leapfrog integrator.
  
      The leapfrog integrator is symplectic, so for sufficiently small step
      sizes it should be possible to run it more or less indefinitely without
      the energy of the system blowing up or collapsing.
  
      Args:
        independent_chain_ndims: Python `int` scalar representing the number of
          dims associated with independent chains.
      """
      seed_stream = test_util.test_seed_stream()
      x = self.evaluate(
          0.1 * tf.random.normal(shape=(50, 10, 2), seed=seed_stream())
      )
      x = tf.constant(x)
      self._integrator_conserves_energy(
          x, independent_chain_ndims, seed=seed_stream()
      )
  
file_path: probability/tensorflow_probability/python/mcmc/internal/leapfrog_integrator_test.py
imports: import numpy
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.mcmc.internal import leapfrog_integrator
label_desc: Use image node_id 5 for calling the LeapfrogIntegratorTest obj's underlying member method code with example usage: obj._integrator_conserves_energy_wrapper(independent_chain_ndims) without return types