code: def _design_matrix_for_one_seasonal_effect(
      num_steps, duration, period, dtype
  ):
      current_period = (
          np.int32(np.arange(num_steps) / duration) % period
      )
      return np.transpose(
          [
              ps.where(
                  current_period
                  == p,  # pylint: disable=g-complex-comprehension
                  ps.ones([], dtype=dtype),
                  ps.zeros([], dtype=dtype),
              )
              for p in range(period)
          ]
      )
  
file_path: probability/tensorflow_probability/python/sts/internal/seasonality_util.py
imports: import collections
  import enum
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import prefer_static
label_desc: Use image node_id 3 for calling a global function with example usage: _design_matrix_for_one_seasonal_effect(num_steps, duration, period, dtype) and returns: np