code: def test_batch_shape(self):
      batch_shape = [4, 2]
      partial_batch_shape = [2]
  
      level_scale = self._build_placeholder(
          np.exp(np.random.randn(*partial_batch_shape))
      )
      slope_scale = self._build_placeholder(
          np.exp(np.random.randn(*batch_shape))
      )
      initial_state_prior = mvn_diag.MultivariateNormalDiag(
          scale_diag=self._build_placeholder([1.0, 1.0])
      )
  
      ssm = LocalLinearTrendStateSpaceModel(
          num_timesteps=10,
          level_scale=level_scale,
          slope_scale=slope_scale,
          initial_state_prior=initial_state_prior,
      )
      self.assertAllEqual(
          self.evaluate(ssm.batch_shape_tensor()), batch_shape
      )
  
      seed = test_util.test_seed(sampler_type="stateless")
      y = ssm.sample(seed=seed)
      self.assertAllEqual(self.evaluate(tf.shape(y))[:-2], batch_shape)
  
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 test_util
  from tensorflow_probability.python.sts.components.local_linear_trend import LocalLinearTrendStateSpaceModel
label_desc: Use image node_id 3 for calling the _LocalLinearTrendStateSpaceModelTest obj's underlying member method code with example usage: obj.test_batch_shape() without return types