code: def test_nesting_additive_ssms(self):
      seed = test_util.test_seed(sampler_type="stateless")
  
      ssm1 = self._dummy_model(batch_shape=[1, 2])
      ssm2 = self._dummy_model(batch_shape=[3, 2])
      observation_noise_scale = 0.1
  
      additive_ssm = AdditiveStateSpaceModel(
          [ssm1, ssm2], observation_noise_scale=observation_noise_scale
      )
  
      nested_additive_ssm = AdditiveStateSpaceModel(
          [
              AdditiveStateSpaceModel([ssm1]),
              AdditiveStateSpaceModel([ssm2]),
          ],
          observation_noise_scale=observation_noise_scale,
      )
  
      # Test that both models behave equivalently.
      y = self.evaluate(nested_additive_ssm.sample(seed=seed))
  
      additive_lp = additive_ssm.log_prob(y)
      nested_additive_lp = nested_additive_ssm.log_prob(y)
      self.assertAllClose(
          self.evaluate(additive_lp), self.evaluate(nested_additive_lp)
      )
  
      additive_mean = additive_ssm.mean()
      nested_additive_mean = nested_additive_ssm.mean()
      self.assertAllClose(
          self.evaluate(additive_mean),
          self.evaluate(nested_additive_mean),
      )
  
      additive_variance = additive_ssm.variance()
      nested_additive_variance = nested_additive_ssm.variance()
      self.assertAllClose(
          self.evaluate(additive_variance),
          self.evaluate(nested_additive_variance),
      )
  
imports: from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import linear_gaussian_ssm
  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.local_linear_trend import LocalLinearTrendStateSpaceModel
  from tensorflow_probability.python.sts.components.sum import AdditiveStateSpaceModel
label_desc: Use image node_id 2 for calling the _AdditiveStateSpaceModelTest obj's underlying member method code with example usage: obj.test_nesting_additive_ssms() without return types