code: def test_matrices_from_component(self):
      num_timesteps = 4
      drift_scale = 1.23
      period = 12
      frequency_multipliers = [1, 3]
  
      component = SmoothSeasonal(
          period=period, frequency_multipliers=frequency_multipliers
      )
  
      ssm = component.make_state_space_model(
          num_timesteps, [drift_scale]
      )
  
      frequency_0 = 2 * np.pi * frequency_multipliers[0] / period
      frequency_1 = 2 * np.pi * frequency_multipliers[1] / period
  
      first_frequency_transition = tf.linalg.LinearOperatorFullMatrix(
          [
              [tf.cos(frequency_0), tf.sin(frequency_0)],
              [-tf.sin(frequency_0), tf.cos(frequency_0)],
          ]
      )
  
      second_frequency_transition = tf.linalg.LinearOperatorFullMatrix(
          [
              [tf.cos(frequency_1), tf.sin(frequency_1)],
              [-tf.sin(frequency_1), tf.cos(frequency_1)],
          ]
      )
  
      latents_transition = self.evaluate(
          tf.linalg.LinearOperatorBlockDiag(
              [first_frequency_transition, second_frequency_transition]
          ).to_dense()
      )
  
      for t in range(num_timesteps):
          observation_matrix = self.evaluate(
              ssm.get_observation_matrix_for_timestep(t).to_dense()
          )
  
          self.assertAllClose(
              [[1.0, 0.0, 1.0, 0.0]], observation_matrix
          )
  
          observation_noise_mean = self.evaluate(
              ssm.get_observation_noise_for_timestep(t).mean()
          )
          observation_noise_covariance = self.evaluate(
              ssm.get_observation_noise_for_timestep(t).covariance()
          )
  
          self.assertAllClose([0.0], observation_noise_mean)
          self.assertAllClose([[0.0]], observation_noise_covariance)
  
          transition_matrix = self.evaluate(
              ssm.get_transition_matrix_for_timestep(t).to_dense()
          )
  
          self.assertAllClose(latents_transition, transition_matrix)
  
          transition_noise_mean = self.evaluate(
              ssm.get_transition_noise_for_timestep(t).mean()
          )
          transition_noise_covariance = self.evaluate(
              ssm.get_transition_noise_for_timestep(t).covariance()
          )
  
          self.assertAllClose(np.zeros([4]), transition_noise_mean)
          self.assertAllClose(
              np.square(drift_scale) * np.eye(4),
              transition_noise_covariance,
          )
  
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.smooth_seasonal import SmoothSeasonal
  from tensorflow_probability.python.sts.components.smooth_seasonal import SmoothSeasonalStateSpaceModel
label_desc: Use image node_id 3 for calling the _SmoothSeasonalStateSpaceModelTest obj's underlying member method code with example usage: obj.test_matrices_from_component() without return types