code: def test_set_out_sample_residuals_when_residuals_length_is_greater_than_1000():
      """
      Test len residuals stored when its length is greater than 1000.
      """
      forecaster = ForecasterAutoregCustom(
          regressor=LinearRegression(),
          fun_predictors=create_predictors,
          window_size=5,
      )
      forecaster.set_out_sample_residuals(residuals=np.arange(2000))
  
      assert len(forecaster.out_sample_residuals) == 1000
  
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 5 for calling a global function with example usage: test_set_out_sample_residuals_when_residuals_length_is_greater_than_1000() without return types