code: def test_results_output_bayesian_search_skopt_ForecasterAutoreg_with_mocked_when_kwargs_gp_minimize():  # pragma: no cover
      """
      Test output of _bayesian_search_skopt in ForecasterAutoreg when kwargs_gp_minimize with mocked
      (mocked done in Skforecast v0.4.3).
      """
      forecaster = ForecasterAutoreg(
          regressor=Ridge(random_state=123),
          lags=2,  # Placeholder, the value will be overwritten
      )
  
      steps = 3
      n_validation = 12
      y_train = y[:-n_validation]
      lags_grid = [2, 4]
      search_space = {
          "alpha": Real(0.01, 1.0, "log-uniform", name="alpha")
      }
  
      # kwargs_gp_minimize
      initial_point_generator = "lhs"
      kappa = 1.8
  
      results = _bayesian_search_skopt(
          forecaster=forecaster,
          y=y,
          lags_grid=lags_grid,
          search_space=search_space,
          steps=steps,
          metric="mean_absolute_error",
          refit=True,
          initial_train_size=len(y_train),
          fixed_train_size=True,
          n_trials=10,
          random_state=123,
          return_best=False,
          verbose=False,
          kwargs_gp_minimize={
              "initial_point_generator": initial_point_generator,
              "kappa": kappa,
          },
      )[0]
  
      expected_results = pd.DataFrame(
          {
              "lags": [
                  [1, 2],
                  [1, 2],
                  [1, 2],
                  [1, 2],
                  [1, 2],
                  [1, 2],
                  [1, 2],
                  [1, 2],
                  [1, 2],
                  [1, 2],
                  [1, 2, 3, 4],
                  [1, 2, 3, 4],
                  [1, 2, 3, 4],
                  [1, 2, 3, 4],
                  [1, 2, 3, 4],
                  [1, 2, 3, 4],
                  [1, 2, 3, 4],
                  [1, 2, 3, 4],
                  [1, 2, 3, 4],
                  [1, 2, 3, 4],
              ],
              "params": [
                  {"alpha": 0.016838723959617538},
                  {"alpha": 0.10033990027966379},
                  {"alpha": 0.30984231371002086},
                  {"alpha": 0.02523894961617201},
                  {"alpha": 0.06431449919265146},
                  {"alpha": 0.04428828255962529},
                  {"alpha": 0.7862467218336935},
                  {"alpha": 0.21382904045131165},
                  {"alpha": 0.4646709105348175},
                  {"alpha": 0.01124059864722814},
                  {"alpha": 0.016838723959617538},
                  {"alpha": 0.10033990027966379},
                  {"alpha": 0.30984231371002086},
                  {"alpha": 0.02523894961617201},
                  {"alpha": 0.06431449919265146},
                  {"alpha": 0.04428828255962529},
                  {"alpha": 0.7862467218336935},
                  {"alpha": 0.21382904045131165},
                  {"alpha": 0.4646709105348175},
                  {"alpha": 0.01124059864722814},
              ],
              "mean_absolute_error": np.array(
                  [
                      0.21183497939493612,
                      0.2120677429498087,
                      0.2125445833833647,
                      0.21185973952472195,
                      0.21197085675244506,
                      0.21191472647731882,
                      0.2132707683116569,
                      0.21234254975249803,
                      0.21282383637032143,
                      0.21181829991953996,
                      0.21669632191054566,
                      0.21662944006267573,
                      0.21637019858109752,
                      0.2166911187311533,
                      0.2166621393072383,
                      0.21667792427267493,
                      0.21566880163156743,
                      0.21649975575675726,
                      0.21614409053015884,
                      0.21669956732317974,
                  ]
              ),
              "alpha": np.array(
                  [
                      0.016838723959617538,
                      0.10033990027966379,
                      0.30984231371002086,
                      0.02523894961617201,
                      0.06431449919265146,
                      0.04428828255962529,
                      0.7862467218336935,
                      0.21382904045131165,
                      0.4646709105348175,
                      0.01124059864722814,
                      0.016838723959617538,
                      0.10033990027966379,
                      0.30984231371002086,
                      0.02523894961617201,
                      0.06431449919265146,
                      0.04428828255962529,
                      0.7862467218336935,
                      0.21382904045131165,
                      0.4646709105348175,
                      0.01124059864722814,
                  ]
              ),
          },
          index=pd.RangeIndex(start=0, stop=20, step=1),
      ).sort_values(by="mean_absolute_error", ascending=True)
  
      pd.testing.assert_frame_equal(results, expected_results)
  
imports: import re
  import pytest
  import numpy
  import pandas
  import sys
  from pytest import approx
  from importlib import metadata
  from sklearn.ensemble import RandomForestRegressor
  from sklearn.linear_model import Ridge
  from sklearn.metrics import mean_absolute_error
  from skforecast.ForecasterAutoreg import ForecasterAutoreg
  from skforecast.ForecasterAutoregCustom import ForecasterAutoregCustom
  from skforecast.model_selection import backtesting_forecaster
  from .fixtures_model_selection import y
  from tqdm import tqdm
  from functools import partialmethod
label_desc: Use image node_id 4 for calling a global function with example usage: test_results_output_bayesian_search_skopt_ForecasterAutoreg_with_mocked_when_kwargs_gp_minimize() without return types