code: def test_calendar_seasonality(
      time_index, forecast_index, freq_period
  ):
      freq, period = freq_period
      cs = CalendarSeasonality(period, freq)
      cs.in_sample(time_index)
      steps = 83 if forecast_index is None else len(forecast_index)
      cs.out_of_sample(steps, time_index, forecast_index)
      assert isinstance(cs.period, str)
      assert isinstance(cs.freq, str)
      str(cs)
      repr(cs)
      hash(cs)
      cs2 = CalendarSeasonality(period, freq)
      assert cs == cs2
  
imports: from statsmodels.compat.pandas import MONTH_END, PD_LT_1_0_0, QUARTER_END, YEAR_END, is_int_index
  from statsmodels.compat.pytest import pytest_warns
  from collections.abc import Hashable
  import numpy
  import pandas
  import pytest
  from statsmodels.tsa.deterministic import CalendarFourier, CalendarSeasonality, CalendarTimeTrend, DeterministicProcess, DeterministicTerm, Fourier, Seasonality, TimeTrend
label_desc: Use image node_id 9 for calling a global function with example usage: test_calendar_seasonality(time_index, forecast_index, freq_period) without return types