code: def test_set_out_sample_residuals_when_residuals_length_is_less_than_1000_and_no_append():
      """
      Test residuals stored when new residuals length is less than 1000 and append is False.
      """
      forecaster = ForecasterAutoregMultiVariate(
          LinearRegression(fit_intercept=True),
          level="l1",
          lags=3,
          steps=2,
          transformer_series=None,
      )
      forecaster.fit(series=series)
      residuals = {1: np.arange(10), 2: np.arange(10)}
      new_residuals = {1: np.arange(20), 2: np.arange(20)}
  
      forecaster.set_out_sample_residuals(residuals=residuals)
      forecaster.set_out_sample_residuals(
          residuals=new_residuals, append=False
      )
  
      expected = {1: np.arange(20), 2: np.arange(20)}
      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/ForecasterAutoregMultiVariate/tests/test_set_out_sample_residuals.py
imports: import re
  import pytest
  import numpy
  import pandas
  from skforecast.ForecasterAutoregMultiVariate import ForecasterAutoregMultiVariate
  from sklearn.linear_model import LinearRegression
  from sklearn.exceptions import NotFittedError
  from sklearn.preprocessing import StandardScaler
label_desc: Use image node_id 6 for calling a global function with example usage: test_set_out_sample_residuals_when_residuals_length_is_less_than_1000_and_no_append() without return types