code: def test_stats(self):
      # Build a model with expected initial loc 0 and slope 1.
      level_scale = self._build_placeholder(1.0)
      slope_scale = self._build_placeholder(1.0)
      initial_state_prior = mvn_diag.MultivariateNormalDiag(
          loc=self._build_placeholder([0, 1.0]),
          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,
      )
  
      # In expectation, the process grows linearly.
      mean = self.evaluate(ssm.mean())
      self.assertAllClose(mean, np.arange(0, 10)[:, np.newaxis])
  
      # slope variance at time T is linear: T * slope_scale
      expected_variance = [1, 3, 8, 18, 35, 61, 98, 148, 213, 295]
      variance = self.evaluate(ssm.variance())
      self.assertAllClose(
          variance, np.array(expected_variance)[:, np.newaxis]
      )
  
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 2 for calling the _LocalLinearTrendStateSpaceModelTest obj's underlying member method code with example usage: obj.test_stats() without return types