code: def test_predict_bootstrapping_output_when_forecaster_is_LinearRegression_exog_steps_is_1_in_sample_residuals_is_True():
      """
      Test output of predict_bootstrapping when regressor is LinearRegression and
      1 step ahead is predicted with exog using in-sample residuals.
      """
      forecaster = ForecasterAutoreg(LinearRegression(), lags=3)
      forecaster.fit(y=y, exog=exog)
      expected = pd.DataFrame(
          data=np.array(
              [[0.39132925, 0.71907802, 0.45297104, 0.52687879]]
          ),
          columns=[f"pred_boot_{i}" for i in range(4)],
          index=pd.RangeIndex(start=50, stop=51),
      )
      results = forecaster.predict_bootstrapping(
          steps=1, n_boot=4, exog=exog_predict, in_sample_residuals=True
      )
  
      pd.testing.assert_frame_equal(expected, results)
  
imports: import re
  import pytest
  import numpy
  import pandas
  from sklearn.exceptions import NotFittedError
  from skforecast.ForecasterAutoreg import ForecasterAutoreg
  from skforecast.preprocessing import TimeSeriesDifferentiator
  from sklearn.linear_model import LinearRegression
  from sklearn.preprocessing import StandardScaler
  from .fixtures_ForecasterAutoreg import y
  from .fixtures_ForecasterAutoreg import exog
  from .fixtures_ForecasterAutoreg import exog_predict
  from .fixtures_ForecasterAutoreg import data
label_desc: Use image node_id 3 for calling a global function with example usage: test_predict_bootstrapping_output_when_forecaster_is_LinearRegression_exog_steps_is_1_in_sample_residuals_is_True() without return types