code: def test_range_index_basic():
      idx = pd.date_range("2000-1-1", freq=MONTH_END, periods=120)
      dp = DeterministicProcess(
          idx, constant=True, order=1, seasonal=True
      )
      dp.range("2001-1-1", "2008-1-1")
      dp.range("2001-1-1", "2015-1-1")
      dp.range("2013-1-1", "2008-1-1")
      dp.range(0, 100)
      dp.range(100, 150)
      dp.range(130, 150)
      with pytest.raises(ValueError):
          dp.range("1990-1-1", "2010-1-1")
  
      idx = pd.period_range("2000-1-1", freq="M", periods=120)
      dp = DeterministicProcess(
          idx, constant=True, order=1, seasonal=True
      )
      dp.range("2001-1-1", "2008-1-1")
      dp.range("2001-1-1", "2015-1-1")
      dp.range("2013-1-1", "2008-1-1")
      with pytest.raises(
          ValueError, match="start must be non-negative"
      ):
          dp.range(-7, 200)
  
      dp.range(0, 100)
      dp.range(100, 150)
      dp.range(130, 150)
  
      idx = pd.RangeIndex(0, 120)
      dp = DeterministicProcess(
          idx, constant=True, order=1, seasonal=True, period=12
      )
      dp.range(0, 100)
      dp.range(100, 150)
      dp.range(120, 150)
      dp.range(130, 150)
      with pytest.raises(ValueError):
          dp.range(-10, 0)
  
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 31 for calling a global function with example usage: test_range_index_basic() without return types