code: def test_fit_same_residuals_when_residuals_greater_than_1000(n_jobs):
      """
      Test fit return same residuals when residuals len is greater than 1000.
      Testing with two different forecaster.
      """
      forecaster = ForecasterAutoregDirect(
          LinearRegression(), lags=3, steps=2, n_jobs=n_jobs
      )
      forecaster.fit(y=pd.Series(np.arange(1200)))
      results_1 = forecaster.in_sample_residuals
  
      forecaster = ForecasterAutoregDirect(
          LinearRegression(), lags=3, steps=2, n_jobs=n_jobs
      )
      forecaster.fit(y=pd.Series(np.arange(1200)))
      results_2 = forecaster.in_sample_residuals
  
      assert isinstance(results_1, dict)
      assert all(isinstance(x, np.ndarray) for x in results_1.values())
      assert isinstance(results_2, dict)
      assert all(isinstance(x, np.ndarray) for x in results_2.values())
      assert results_1.keys() == results_2.keys()
      assert all(len(results_1[k] == 1000) for k in results_1.keys())
      assert all(len(results_2[k] == 1000) for k in results_2.keys())
      assert all(
          all(results_1[k] == results_2[k]) for k in results_2.keys()
      )
  
file_path: skforecast/skforecast/ForecasterAutoregDirect/tests/test_fit.py
imports: import re
  import pytest
  import numpy
  import pandas
  from skforecast.ForecasterAutoregDirect import ForecasterAutoregDirect
  from sklearn.linear_model import LinearRegression
label_desc: Use image node_id 4 for calling a global function with example usage: test_fit_same_residuals_when_residuals_greater_than_1000(n_jobs) without return types