code: def get_seasonal_latents_shape(timeseries, model, num_chains=()):
      """Computes the shape of seasonal latents.
  
      Args:
        timeseries: Timeseries that is being modeled. Used to extract the timeseries
          length and batch shape.
        model: The `sts.Sum` model that the seasonal components will be found in.
          Must be a Gibbs-samplable model built with
          `build_model_for_gibbs_fitting`.
        num_chains: Optional int to indicate the number of parallel MCMC chains.
          Default to an empty tuple to sample a single chain.
  
      Returns:
        A shape list.
      """
      (
          _,
          _,
          seasonal_indices_and_components,
      ) = _get_components_from_model(model)
  
      seasonal_total_size = 0
      for _, seasonal_component in seasonal_indices_and_components:
          seasonal_total_size += seasonal_component.latent_size
  
      batch_shape = prefer_static.concat(
          [num_chains, prefer_static.shape(timeseries)[:-1]], axis=-1
      )
      timeseries_shape = prefer_static.shape(timeseries)[-1:]
      # Shape of all the seasonality component levels added together.
      seasonal_levels_shape = [seasonal_total_size]
      return prefer_static.concat(
          [batch_shape, timeseries_shape, seasonal_levels_shape], axis=0
      )
  
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 5 for calling a global function with example usage: get_seasonal_latents_shape(timeseries, model, num_chains) and returns: prefer_static