code: def testEqualsLocalLevel(self):
      # An AR1 process with coef 1 is just a random walk, equivalent to a local
      # level model. Test that both models define the same distribution
      # (log-prob).
      num_timesteps = 10
      observed_time_series = self._build_placeholder(
          np.random.randn(num_timesteps, 1)
      )
  
      level_scale = self._build_placeholder(0.1)
  
      # We'll test an AR1 process, and also (just for kicks) that the trivial
      # embedding as an AR2 process gives the same model.
      coefficients_order1 = np.array([1.0]).astype(self.dtype)
      coefficients_order2 = np.array([1.0, 0.0]).astype(self.dtype)
  
      ar1_ssm = AutoregressiveStateSpaceModel(
          num_timesteps=num_timesteps,
          coefficients=coefficients_order1,
          level_scale=level_scale,
          initial_state_prior=mvn_diag.MultivariateNormalDiag(
              scale_diag=[level_scale]
          ),
      )
      ar2_ssm = AutoregressiveStateSpaceModel(
          num_timesteps=num_timesteps,
          coefficients=coefficients_order2,
          level_scale=level_scale,
          initial_state_prior=mvn_diag.MultivariateNormalDiag(
              scale_diag=[level_scale, 1.0]
          ),
      )
  
      local_level_ssm = LocalLevelStateSpaceModel(
          num_timesteps=num_timesteps,
          level_scale=level_scale,
          initial_state_prior=mvn_diag.MultivariateNormalDiag(
              scale_diag=[level_scale]
          ),
      )
  
      ar1_lp, ar2_lp, ll_lp = self.evaluate(
          (
              ar1_ssm.log_prob(observed_time_series),
              ar2_ssm.log_prob(observed_time_series),
              local_level_ssm.log_prob(observed_time_series),
          )
      )
      self.assertAllClose(ar1_lp, ll_lp)
      self.assertAllClose(ar2_lp, ll_lp)
  
imports: import numpy
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import mvn_diag
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.sts.components.autoregressive import AutoregressiveStateSpaceModel
  from tensorflow_probability.python.sts.components.local_level import LocalLevelStateSpaceModel
label_desc: Use image node_id 1 for calling the _AutoregressiveStateSpaceModelTest obj's underlying member method code with example usage: obj.testEqualsLocalLevel() without return types