code: def test_fit_in_sample_residuals_stored():
      """
      Test that values of in_sample_residuals are stored after fitting.
      """
      forecaster = ForecasterAutoreg(LinearRegression(), lags=3)
      forecaster.fit(y=pd.Series(np.arange(5)))
      results = forecaster.in_sample_residuals
      expected = np.array([0.0, 0.0])
  
      assert isinstance(results, np.ndarray)
      np.testing.assert_array_equal(results, expected)
  
file_path: skforecast/skforecast/ForecasterAutoreg/tests/test_fit.py
imports: import numpy
  import pandas
  from skforecast.ForecasterAutoreg import ForecasterAutoreg
  from sklearn.linear_model import LinearRegression
  from .fixtures_ForecasterAutoreg import y
label_desc: Use image node_id 4 for calling a global function with example usage: test_fit_in_sample_residuals_stored() without return types