code: def test_keyerror_start_date():
      x = np.arange(1, 36.0)
  
      # dates = date_range("1972-4-1", "2007-4-1", freq="AS-APR")
      dates = pd.date_range("1972-4-30", "2006-4-30", freq=YE_APR)
      series = pd.Series(x, index=dates)
      model = TimeSeriesModel(series)
  
      npt.assert_raises(
          KeyError, model._get_prediction_index, "1970-4-30", None
      )
  
file_path: statsmodels/statsmodels/tsa/base/tests/test_base.py
imports: from statsmodels.compat.pandas import PD_LT_2_2_0
  from datetime import datetime
  import numpy
  import numpy.testing
  import pandas
  import pytest
  from statsmodels.tools.sm_exceptions import ValueWarning
  from statsmodels.tools.testing import assert_equal
  from statsmodels.tsa.base.tsa_model import TimeSeriesModel
label_desc: Use image node_id 3 for calling a global function with example usage: test_keyerror_start_date() without return types