code: def test_set_out_sample_residuals_when_residuals_length_is_less_than_1000_and_append():
      """
      Test residuals stored when new residuals length is less than 1000 and append is True.
      """
      forecaster = ForecasterAutoregMultiSeries(
          LinearRegression(), lags=3, transformer_series=None
      )
      forecaster.fit(series=series)
      residuals = {"l1": np.arange(10), "l2": np.arange(10)}
  
      forecaster.set_out_sample_residuals(residuals=residuals)
      forecaster.set_out_sample_residuals(
          residuals=residuals, append=True
      )
  
      expected = {
          "l1": np.append(np.arange(10), np.arange(10)),
          "l2": np.append(np.arange(10), np.arange(10)),
      }
      results = forecaster.out_sample_residuals
  
      assert expected.keys() == results.keys()
      assert all(
          all(expected[k] == results[k]) for k in expected.keys()
      )
  
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 7 for calling a global function with example usage: test_set_out_sample_residuals_when_residuals_length_is_less_than_1000_and_append() without return types