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 = ForecasterAutoregMultiSeries(
          LinearRegression(), lags=3, transformer_series=None
      )
      forecaster.fit(series=series)
  
      residuals = {"l1": np.arange(2000), "l2": np.arange(2000)}
      forecaster.set_out_sample_residuals(residuals=residuals)
      results = forecaster.out_sample_residuals
  
      assert list(results.keys()) == ["l1", "l2"]
      assert all(len(value) == 1000 for value in results.values())
  
file_path: skforecast/skforecast/ForecasterAutoregMultiSeries/tests/test_set_out_sample_residuals.py
imports: import re
  import pytest
  import numpy
  import pandas
  from skforecast.ForecasterAutoregMultiSeries import ForecasterAutoregMultiSeries
  from sklearn.linear_model import LinearRegression
  from sklearn.exceptions import NotFittedError
  from sklearn.preprocessing import StandardScaler
label_desc: Use image node_id 8 for calling a global function with example usage: test_set_out_sample_residuals_when_residuals_length_is_greater_than_1000() without return types