code: def test_output_backtesting_forecaster_refit_int_interval_yes_exog_yes_remainder_with_mocked():
      """
      Test output of backtesting_forecaster refit with backtesting mocked, interval yes.
      Regressor is LinearRegression with lags=3, Series y is mocked, exog is mocked,
      20 observations to backtest, steps=5 and gap=0, metric='mean_squared_error',
      'in_sample_residuals = True'. Refit int.
      """
      expected_metric = 0.06099110404144631
      expected_predictions = pd.DataFrame(
          data=np.array(
              [
                  [0.55616986, 0.15288789, 0.89198752],
                  [0.48751797, 0.05863911, 0.83169303],
                  [0.57764391, 0.17436194, 0.91346157],
                  [0.51298667, 0.08410781, 0.85716173],
                  [0.47430051, 0.0796644, 0.82587748],
                  [0.49192271, 0.15006787, 0.84017409],
                  [0.52213783, 0.12750172, 0.8737148],
                  [0.54492575, 0.20307092, 0.89317713],
                  [0.52501537, 0.13641764, 0.86685356],
                  [0.4680474, 0.08515461, 0.81080044],
                  [0.51059498, 0.12199725, 0.85243317],
                  [0.53067132, 0.14777853, 0.87342436],
                  [0.4430938, 0.0509291, 0.69854202],
                  [0.49911716, 0.1231365, 0.8711497],
                  [0.44546347, 0.05329877, 0.70091169],
                  [0.46530749, 0.08932683, 0.83734003],
                  [0.46901878, 0.08173407, 0.82098555],
                  [0.55371362, 0.14618224, 0.98199137],
                  [0.60759064, 0.22030593, 0.9595574],
                  [0.50415336, 0.09662198, 0.93243111],
              ]
          ),
          columns=["pred", "lower_bound", "upper_bound"],
          index=pd.RangeIndex(start=30, stop=50, step=1),
      )
  
      forecaster = ForecasterAutoregDirect(
          regressor=Ridge(random_state=123), lags=3, steps=8
      )
  
      n_backtest = 20
      y_train = y[:-n_backtest]
  
      metric, backtest_predictions = _backtesting_forecaster(
          forecaster=forecaster,
          y=y,
          exog=exog,
          refit=2,
          initial_train_size=len(y_train),
          fixed_train_size=False,
          gap=0,
          allow_incomplete_fold=True,
          steps=2,
          metric="mean_squared_error",
          interval=[5, 95],
          n_boot=500,
          random_state=123,
          in_sample_residuals=True,
          verbose=False,
          n_jobs=1,
      )
  
      assert expected_metric == approx(metric)
      pd.testing.assert_frame_equal(
          expected_predictions, backtest_predictions
      )
  
imports: import pytest
  import numpy
  import pandas
  from pytest import approx
  from sklearn.linear_model import LinearRegression
  from sklearn.linear_model import Ridge
  from sklearn.metrics import mean_squared_error
  from skforecast.ForecasterAutoreg import ForecasterAutoreg
  from skforecast.ForecasterAutoregCustom import ForecasterAutoregCustom
  from skforecast.ForecasterAutoregDirect import ForecasterAutoregDirect
  from skforecast.model_selection.model_selection import _backtesting_forecaster
  from .fixtures_model_selection import y
  from .fixtures_model_selection import exog
  from .fixtures_model_selection import out_sample_residuals
label_desc: Use image node_id 22 for calling a global function with example usage: test_output_backtesting_forecaster_refit_int_interval_yes_exog_yes_remainder_with_mocked() without return types