code: def test_check_index_type():
      ct = CalendarTimeTrend(YEAR_END, True, order=3)
      idx = pd.RangeIndex(0, 20)
      with pytest.raises(
          TypeError, match="CalendarTimeTrend terms can only"
      ):
          ct._check_index_type(idx, pd.DatetimeIndex)
      with pytest.raises(
          TypeError, match="CalendarTimeTrend terms can only"
      ):
          ct._check_index_type(idx, (pd.DatetimeIndex,))
      with pytest.raises(
          TypeError, match="CalendarTimeTrend terms can only"
      ):
          ct._check_index_type(idx, (pd.DatetimeIndex, pd.PeriodIndex))
      idx = pd.Index([0, 1, 1, 2, 3, 5, 8, 13])
      with pytest.raises(
          TypeError, match="CalendarTimeTrend terms can only"
      ):
          types = (pd.DatetimeIndex, pd.PeriodIndex, pd.RangeIndex)
          ct._check_index_type(idx, types)
  
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 13 for calling a global function with example usage: test_check_index_type() without return types