code: def testEqualsAutoregressive(self):
      # An ARMA(p, 0) process is just an AR(p) processes
      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, 1.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]
          ),
      )
      arma1_ssm = AutoregressiveMovingAverageStateSpaceModel(
          num_timesteps=num_timesteps,
          ar_coefficients=coefficients_order1,
          ma_coefficients=np.array([0.0]).astype(self.dtype),
          level_scale=level_scale,
          initial_state_prior=mvn_diag.MultivariateNormalDiag(
              scale_diag=[level_scale, 1.0]
          ),
      )
      arma2_ssm = AutoregressiveMovingAverageStateSpaceModel(
          num_timesteps=num_timesteps,
          ar_coefficients=coefficients_order2,
          ma_coefficients=np.array([0.0]).astype(self.dtype),
          level_scale=level_scale,
          initial_state_prior=mvn_diag.MultivariateNormalDiag(
              scale_diag=[level_scale, 1.0]
          ),
      )
  
      ar1_lp, arma1_lp, ar2_lp, arma2_lp = (
          ar1_ssm.log_prob(observed_time_series),
          arma1_ssm.log_prob(observed_time_series),
          ar2_ssm.log_prob(observed_time_series),
          arma2_ssm.log_prob(observed_time_series),
      )
      self.assertAllClose(ar1_lp, arma1_lp)
      self.assertAllClose(ar2_lp, arma2_lp)
  
imports: import numpy
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import mvn_diag
  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.autoregressive_moving_average import AutoregressiveMovingAverageStateSpaceModel
label_desc: Use image node_id 1 for calling the _AutoregressiveMovingAverageStateSpaceModelTest obj's underlying member method code with example usage: obj.testEqualsAutoregressive() without return types