code: def _observe_timeseries_fn(timeseries):
      """Build an observation_noise_fn that observes a Tensor timeseries."""
  
      def observation_noise_fn(t):
          current_slice = tf.gather(timeseries, t)
          return mvn_diag.MultivariateNormalDiag(
              loc=current_slice, scale_diag=tf.zeros_like(current_slice)
          )
  
      return observation_noise_fn
  
imports: import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import identity
  from tensorflow_probability.python.bijectors import softplus
  from tensorflow_probability.python.distributions import half_normal
  from tensorflow_probability.python.distributions import independent
  from tensorflow_probability.python.distributions import inverse_gamma
  from tensorflow_probability.python.distributions import linear_gaussian_ssm
  from tensorflow_probability.python.distributions import mvn_diag
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.distributions import sample
  from tensorflow_probability.python.distributions import student_t
  from tensorflow_probability.python.internal import distribution_util
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.sts.structural_time_series import Parameter
  from tensorflow_probability.python.sts.structural_time_series import StructuralTimeSeries
label_desc: Use image node_id 2 for calling a global function with example usage: _observe_timeseries_fn(timeseries) and returns: observation_noise_fn, mvn_diag