code: def test_predict_interval_output_when_forecaster_is_LinearRegression_steps_is_1_in_sample_residuals_is_True():
      """
      Test output when regressor is LinearRegression and one step ahead is predicted
      using in sample residuals.
      """
      forecaster = ForecasterAutoregMultiSeries(
          LinearRegression(), lags=3, transformer_series=None
      )
      forecaster.fit(series=series_2, store_in_sample_residuals=True)
  
      forecaster.in_sample_residuals["1"] = np.full_like(
          forecaster.in_sample_residuals["1"], fill_value=10
      )
      expected_1 = pd.DataFrame(
          data=np.array([[10.0, 20.0, 20.0]]),
          columns=["1", "1_lower_bound", "1_upper_bound"],
          index=pd.RangeIndex(start=10, stop=11, step=1),
      )
      results_1 = forecaster.predict_interval(
          steps=1, levels="1", in_sample_residuals=True
      )
  
      forecaster.in_sample_residuals["2"] = np.full_like(
          forecaster.in_sample_residuals["2"], fill_value=20
      )
      expected_2 = pd.DataFrame(
          data=np.array([[10.0, 30.0, 30.0]]),
          columns=["2", "2_lower_bound", "2_upper_bound"],
          index=pd.RangeIndex(start=10, stop=11, step=1),
      )
      results_2 = forecaster.predict_interval(
          steps=1, levels=["2"], in_sample_residuals=True
      )
  
      expected_3 = pd.DataFrame(
          data=np.array([[10.0, 20.0, 20.0, 10.0, 30.0, 30.0]]),
          columns=[
              "1",
              "1_lower_bound",
              "1_upper_bound",
              "2",
              "2_lower_bound",
              "2_upper_bound",
          ],
          index=pd.RangeIndex(start=10, stop=11, step=1),
      )
      results_3 = forecaster.predict_interval(
          steps=1, levels=None, in_sample_residuals=True
      )
  
      pd.testing.assert_frame_equal(results_1, expected_1)
      pd.testing.assert_frame_equal(results_2, expected_2)
      pd.testing.assert_frame_equal(results_3, expected_3)
  
imports: import re
  import pytest
  import numpy
  import pandas
  from skforecast.ForecasterAutoregMultiSeries import ForecasterAutoregMultiSeries
  from sklearn.compose import ColumnTransformer
  from sklearn.preprocessing import StandardScaler
  from sklearn.preprocessing import MinMaxScaler
  from sklearn.preprocessing import OneHotEncoder
  from sklearn.linear_model import LinearRegression
  from .fixtures_ForecasterAutoregMultiSeries import series
  from .fixtures_ForecasterAutoregMultiSeries import exog
  from .fixtures_ForecasterAutoregMultiSeries import exog_predict
label_desc: Use image node_id 3 for calling a global function with example usage: test_predict_interval_output_when_forecaster_is_LinearRegression_steps_is_1_in_sample_residuals_is_True() without return types