code: def build_is_last_day_of_season(num_steps_per_season):
      """Build utility method to compute whether the season is changing."""
      num_steps_per_cycle = np.sum(num_steps_per_season)
      changepoints = np.cumsum(np.ravel(num_steps_per_season)) - 1
  
      def is_last_day_of_season(t):
          t_ = dist_util.maybe_get_static_value(t)
          if t_ is not None:  # static case
              step_in_cycle = t_ % num_steps_per_cycle
              return any(step_in_cycle == changepoints)
          else:
              step_in_cycle = tf.math.floormod(t, num_steps_per_cycle)
              return tf.reduce_any(
                  tf.equal(step_in_cycle, changepoints)
              )
  
      return is_last_day_of_season
  
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import chain
  from tensorflow_probability.python.bijectors import invert
  from tensorflow_probability.python.bijectors import scale
  from tensorflow_probability.python.bijectors import softplus
  from tensorflow_probability.python.bijectors import square
  from tensorflow_probability.python.distributions import inverse_gamma
  from tensorflow_probability.python.distributions import linear_gaussian_ssm
  from tensorflow_probability.python.distributions import lognormal
  from tensorflow_probability.python.distributions import mvn_diag
  from tensorflow_probability.python.distributions import mvn_tril
  from tensorflow_probability.python.distributions import normal
  from tensorflow_probability.python.distributions import transformed_distribution
  from tensorflow_probability.python.experimental.sts_gibbs import sample_parameters
  from tensorflow_probability.python.internal import distribution_util
  from tensorflow_probability.python.internal import docstring_util
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.sts.internal import 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 1 for calling a global function with example usage: build_is_last_day_of_season(num_steps_per_season) and returns: is_last_day_of_season, any, tf