code: def test_autoregression_ad():
      model = AutoregressionAD(n_steps=3, step_size=7)
      s_train = s.copy().iloc[:-10]
      model.fit(s_train)
  
      s_test = s.copy().iloc[-21:]
      s_test.iloc[-1:] = 10
      pd.testing.assert_series_equal(
          model.predict(s_test),
          pd.Series([np.nan] * 21, index=s_test.index),
      )
  
      s_test = s.copy().iloc[-22:]
      s_test.iloc[-1:] = 10
      pd.testing.assert_series_equal(
          model.predict(s_test),
          pd.Series([np.nan] * 21 + [1.0], index=s_test.index),
      )
  
imports: import numpy
  import pandas
  from adtk.detector import AutoregressionAD, LevelShiftAD, PersistAD, VolatilityShiftAD
label_desc: Use image node_id 4 for calling a global function with example usage: test_autoregression_ad() without return types