code: def test_same_out_sample_residuals_stored_when_residuals_length_is_greater_than_1000():
      """
      Test same out sample residuals are stored when its length is greater than 1000
      executing function two times.
      """
      forecaster = ForecasterAutoregCustom(
          regressor=LinearRegression(),
          fun_predictors=create_predictors,
          window_size=5,
      )
      forecaster.set_out_sample_residuals(residuals=np.arange(2000))
      out_sample_residuals_1 = forecaster.out_sample_residuals
      forecaster = ForecasterAutoregCustom(
          regressor=LinearRegression(),
          fun_predictors=create_predictors,
          window_size=5,
      )
      forecaster.set_out_sample_residuals(residuals=np.arange(2000))
      out_sample_residuals_2 = forecaster.out_sample_residuals
  
      assert (out_sample_residuals_1 == out_sample_residuals_2).all()
  
file_path: skforecast/skforecast/ForecasterAutoregCustom/tests/test_set_out_sample_residuals.py
imports: import re
  import pytest
  import numpy
  import pandas
  from skforecast.ForecasterAutoregCustom import ForecasterAutoregCustom
  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_same_out_sample_residuals_stored_when_residuals_length_is_greater_than_1000() without return types