class_docstr: Tests the Autoregressive distribution.
class_docstr_tok: ["Tests","the","Autoregressive","distribution","."]
code: def testVariableNumSteps(self):
      def fn(sample=0.0):
          return normal.Normal(loc=tf.zeros_like(sample), scale=1.0)
  
      num_steps = tf.Variable(4, dtype=tf.int64)
      self.evaluate(num_steps.initializer)
  
      ar = autoregressive.Autoregressive(
          fn, num_steps=num_steps, validate_args=True
      )
      sample = ar.sample(seed=test_util.test_seed())
      log_prob = ar.log_prob(sample)
      self.assertAllEqual([], sample.shape)
      self.assertAllEqual([], log_prob.shape)
  
      [sample, log_prob] = self.evaluate([sample, log_prob])
      self.assertAllEqual([], sample.shape)
      self.assertAllEqual([], log_prob.shape)
  
imports: import warnings
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import masked_autoregressive
  from tensorflow_probability.python.bijectors import scale_matvec_tril
  from tensorflow_probability.python.distributions import autoregressive
  from tensorflow_probability.python.distributions import categorical
  from tensorflow_probability.python.distributions import distribution
  from tensorflow_probability.python.distributions import independent
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.distributions import sample
  from tensorflow_probability.python.distributions import transformed_distribution
  from tensorflow_probability.python.internal import reparameterization
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import linalg
label_desc: Use image node_id 7 for calling the AutoregressiveTest obj's underlying member method code with example usage: obj.testVariableNumSteps() and returns: normal