code: def test_fit_in_sample_residuals_stored():
      """
      Test that values of in_sample_residuals are stored after fitting
      when `store_in_sample_residuals=True`.
      """
      series = pd.DataFrame(
          {"1": pd.Series(np.arange(5)), "2": pd.Series(np.arange(5))}
      )
  
      forecaster = ForecasterAutoregMultiSeriesCustom(
          regressor=LinearRegression(),
          fun_predictors=create_predictors,
          window_size=3,
      )
      forecaster.fit(series=series, store_in_sample_residuals=True)
      expected = {
          "1": np.array([-4.4408921e-16, 0.0000000e00]),
          "2": np.array([0.0, 0.0]),
      }
      results = forecaster.in_sample_residuals
  
      assert isinstance(results, dict)
      assert np.all(isinstance(x, np.ndarray) for x in results.values())
      assert results.keys() == expected.keys()
      assert np.all(
          np.all(np.isclose(results[k], expected[k]))
          for k in expected.keys()
      )
  
file_path: skforecast/skforecast/ForecasterAutoregMultiSeriesCustom/tests/test_fit.py
imports: import re
  import pytest
  import numpy
  import pandas
  from skforecast.ForecasterAutoregMultiSeriesCustom import ForecasterAutoregMultiSeriesCustom
  from sklearn.linear_model import LinearRegression
  from sklearn.preprocessing import StandardScaler
label_desc: Use image node_id 6 for calling a global function with example usage: test_fit_in_sample_residuals_stored() without return types