code: def _compute_seasonal_effect_from_levels(
      seasonal_levels, seasonal_components, default_dtype
  ):
      """Given the seasonal levels, computes the effect on the timeseries."""
      if not seasonal_components:
          # Use a passed in dtype for the results for cases where the seasonal_levels
          # are just empty, and their dtype may not match the computation dtype since
          # they are default initialized.
          return tf.zeros(shape=(1), dtype=default_dtype)
      ret = tf.zeros(
          dtype=seasonal_levels.dtype,
          # Retain the batch shape.
          shape=seasonal_levels.shape[:-1],
      )
      next_latent_index = 0
      for seasonal_component in seasonal_components:
          ret += seasonal_levels[
              ...,
              # The observation matrix is always just [1., 0., ..., 0.] for
              # the seasonal state space models. Thus as an efficiency gain,
              # just access it directly rather than constructing all the
              # observation matrices at each timestep.
              next_latent_index,
          ]
          next_latent_index += seasonal_component.latent_size
      return ret
  
imports: import collections
  import itertools
  import numpy
  import six
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import identity
  from tensorflow_probability.python.bijectors import invert
  from tensorflow_probability.python.bijectors import square
  from tensorflow_probability.python.distributions import categorical
  from tensorflow_probability.python.distributions import distribution
  from tensorflow_probability.python.distributions import gamma
  from tensorflow_probability.python.distributions import inverse_gamma
  from tensorflow_probability.python.distributions import mixture_same_family
  from tensorflow_probability.python.distributions import mvn_diag
  from tensorflow_probability.python.distributions import mvn_linear_operator
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.distributions import normal_conjugate_posteriors
  from tensorflow_probability.python.distributions import transformed_distribution
  from tensorflow_probability.python.experimental.distributions import mvn_precision_factor_linop
  from tensorflow_probability.python.experimental.sts_gibbs import dynamic_spike_and_slab
  from tensorflow_probability.python.experimental.sts_gibbs import sample_parameters
  from tensorflow_probability.python.experimental.sts_gibbs import spike_and_slab
  from tensorflow_probability.python.internal import distribution_util
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import reparameterization
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.sts.components import local_level
  from tensorflow_probability.python.sts.components import local_linear_trend
  from tensorflow_probability.python.sts.components import regression
  from tensorflow_probability.python.sts.components import seasonal
  from tensorflow_probability.python.sts.components import sum
  from tensorflow_probability.python.sts.internal import util
label_desc: Use image node_id 14 for calling a global function with example usage: _compute_seasonal_effect_from_levels(seasonal_levels, seasonal_components, default_dtype) and returns: ret, tf