code: def test_fit_in_sample_residuals_not_stored(n_jobs):
      """
      Test that values of in_sample_residuals are not stored after fitting
      when `store_in_sample_residuals=False`.
      """
      forecaster = ForecasterAutoregDirect(
          LinearRegression(), lags=3, steps=2, n_jobs=n_jobs
      )
      forecaster.fit(
          y=pd.Series(np.arange(5)), store_in_sample_residuals=False
      )
      expected = {1: None, 2: None}
      results = forecaster.in_sample_residuals
  
      assert isinstance(results, dict)
      assert results.keys() == expected.keys()
      assert all(results[k] == expected[k] for k in expected.keys())
  
file_path: skforecast/skforecast/ForecasterAutoregDirect/tests/test_fit.py
imports: import re
  import pytest
  import numpy
  import pandas
  from skforecast.ForecasterAutoregDirect import ForecasterAutoregDirect
  from sklearn.linear_model import LinearRegression
label_desc: Use image node_id 5 for calling a global function with example usage: test_fit_in_sample_residuals_not_stored(n_jobs) without return types