code: def test_batch_shape_ignores_component_state_priors(self):
      # If we pass an initial_state_prior directly to an AdditiveSSM, overriding
      # the initial state priors of component models, the overall batch shape
      # should no longer depend on the (overridden) component priors.
      # This ensures that we produce correct shapes in forecasting, where the
      # shapes may have changed to include dimensions corresponding to posterior
      # draws.
  
      # Create a component model with no batch shape *except* in the initial state
      # prior.
      latent_size = 2
      ssm = self._dummy_model(
          latent_size=latent_size,
          batch_shape=[],
          initial_state_prior_batch_shape=[5, 5],
      )
  
      # If we override the initial state prior with an unbatched prior, the
      # resulting AdditiveSSM should not have batch dimensions.
      unbatched_initial_state_prior = mvn_diag.MultivariateNormalDiag(
          scale_diag=self._build_placeholder(np.ones([latent_size]))
      )
      additive_ssm = AdditiveStateSpaceModel(
          [ssm], initial_state_prior=unbatched_initial_state_prior
      )
  
      self.assertAllEqual(
          self.evaluate(additive_ssm.batch_shape_tensor()), []
      )
  
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 12 for calling the _AdditiveStateSpaceModelTest obj's underlying member method code with example usage: obj.test_batch_shape_ignores_component_state_priors() without return types