code: def test_basic_statistics(self):
      # Verify that this model constructs a distribution with mean
      # `matmul(design_matrix, weights)` and stddev 0.
      batch_shape = [4, 3]
      num_timesteps = 10
      num_features = 2
      design_matrix = self._build_placeholder(
          np.random.randn(
              *(batch_shape + [num_timesteps, num_features])
          )
      )
  
      linear_regression = LinearRegression(design_matrix=design_matrix)
      true_weights = self._build_placeholder(
          np.random.randn(*(batch_shape + [num_features]))
      )
      predicted_time_series = tf.linalg.matmul(
          design_matrix, true_weights[..., tf.newaxis]
      )
  
      ssm = linear_regression.make_state_space_model(
          num_timesteps=num_timesteps,
          param_vals={"weights": true_weights},
      )
      self.assertAllEqual(
          self.evaluate(ssm.mean()), predicted_time_series
      )
      self.assertAllEqual(
          *self.evaluate(
              (ssm.stddev(), tf.zeros_like(predicted_time_series))
          )
      )
  
imports: import numpy
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import cauchy
  from tensorflow_probability.python.distributions import exponential
  from tensorflow_probability.python.distributions import independent
  from tensorflow_probability.python.distributions import lognormal
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.sts.components.regression import LinearRegression
  from tensorflow_probability.python.sts.components.regression import SparseLinearRegression
  from tensorflow_probability.python.sts.components.sum import Sum
label_desc: Use image node_id 1 for calling the _LinearRegressionTest obj's underlying member method code with example usage: obj.test_basic_statistics() without return types