code: def test_output_backtesting_forecaster_no_exog_no_remainder_ForecasterAutoregDirect_with_mocked():
      """
      Test output of _backtesting_forecaster with backtesting mocked, interval no.
      Regressor is LinearRegression with lags=3, Series y is mocked, no exog,
      12 observations to backtest, steps=4 (no remainder), metric='mean_squared_error'
      ForecasterAutoregDirect.
      """
      expected_metric = 0.06999891546733726
      expected_predictions = pd.DataFrame(
          {
              "pred": np.array(
                  [
                      0.5468482,
                      0.44670961,
                      0.57651222,
                      0.52511275,
                      0.39745044,
                      0.53365885,
                      0.39390143,
                      0.47002119,
                      0.38080838,
                      0.56987255,
                      0.42302249,
                      0.45580163,
                  ]
              )
          },
          index=pd.RangeIndex(start=38, stop=50, step=1),
      )
  
      forecaster = ForecasterAutoregDirect(
          regressor=LinearRegression(), lags=3, steps=4
      )
  
      n_backtest = 12
      y_train = y[:-n_backtest]
  
      metric, backtest_predictions = _backtesting_forecaster(
          forecaster=forecaster,
          y=y,
          exog=None,
          refit=False,
          initial_train_size=len(y_train),
          steps=4,
          metric="mean_squared_error",
          interval=None,
          n_boot=500,
          random_state=123,
          in_sample_residuals=True,
          verbose=False,
      )
  
      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.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 4 for calling a global function with example usage: test_output_backtesting_forecaster_no_exog_no_remainder_ForecasterAutoregDirect_with_mocked() without return types