code: def test_results_output_bayesian_search_forecaster_multiseries_optuna_engine_ForecasterAutoregMultiSeries_with_mocked():
      """
      Test output of bayesian_search_forecaster_multiseries in
      ForecasterAutoregMultiSeries with mocked using
      optuna engine (mocked done in Skforecast v0.12.0).
      """
      forecaster = ForecasterAutoregMultiSeries(
          regressor=Ridge(random_state=123), lags=2
      )
  
      steps = 3
      n_validation = 12
      lags_grid = {"lags_1": 2, "lags_2": 4}
  
      def search_space(trial):
          search_space = {
              "alpha": trial.suggest_float("alpha", 1e-2, 1.0)
          }
  
          return search_space
  
      results = bayesian_search_forecaster_multiseries(
          forecaster=forecaster,
          series=series,
          steps=steps,
          lags_grid=lags_grid,
          search_space=search_space,
          metric="mean_absolute_error",
          refit=False,
          initial_train_size=len(series) - n_validation,
          n_trials=10,
          random_state=123,
          return_best=False,
          verbose=False,
          engine="optuna",
      )[0]
  
      expected_results = pd.DataFrame(
          {
              "levels": [["l1", "l2"]] * 10 * 2,
              "lags": ["lags_2"] * 10 + ["lags_1"] * 10,
              "params": [
                  {"alpha": 0.2345829390285611},
                  {"alpha": 0.29327794160087567},
                  {"alpha": 0.398196343012209},
                  {"alpha": 0.42887539552321635},
                  {"alpha": 0.48612258246951734},
                  {"alpha": 0.5558016213920624},
                  {"alpha": 0.6879814411990146},
                  {"alpha": 0.6995044937418831},
                  {"alpha": 0.7222742800877074},
                  {"alpha": 0.9809565564007693},
                  {"alpha": 0.2345829390285611},
                  {"alpha": 0.29327794160087567},
                  {"alpha": 0.398196343012209},
                  {"alpha": 0.42887539552321635},
                  {"alpha": 0.48612258246951734},
                  {"alpha": 0.5558016213920624},
                  {"alpha": 0.6879814411990146},
                  {"alpha": 0.6995044937418831},
                  {"alpha": 0.7222742800877074},
                  {"alpha": 0.9809565564007693},
              ],
              "mean_absolute_error": np.array(
                  [
                      0.20880267,
                      0.2088056,
                      0.20881083,
                      0.20881236,
                      0.2088152,
                      0.20881864,
                      0.20882514,
                      0.20882571,
                      0.20882682,
                      0.20883941,
                      0.20912689,
                      0.20912843,
                      0.2091312,
                      0.209132,
                      0.2091335,
                      0.20913533,
                      0.20913878,
                      0.20913908,
                      0.20913967,
                      0.20914639,
                  ]
              ),
              "alpha": np.array(
                  [
                      0.23458294,
                      0.29327794,
                      0.39819634,
                      0.4288754,
                      0.48612258,
                      0.55580162,
                      0.68798144,
                      0.69950449,
                      0.72227428,
                      0.98095656,
                      0.23458294,
                      0.29327794,
                      0.39819634,
                      0.4288754,
                      0.48612258,
                      0.55580162,
                      0.68798144,
                      0.69950449,
                      0.72227428,
                      0.98095656,
                  ]
              ),
          },
          index=pd.Index(
              [
                  12,
                  11,
                  19,
                  15,
                  18,
                  13,
                  17,
                  10,
                  14,
                  16,
                  2,
                  1,
                  9,
                  5,
                  8,
                  3,
                  7,
                  0,
                  4,
                  6,
              ],
              dtype="int64",
          ),
      )
  
      pd.testing.assert_frame_equal(results, expected_results)
  
file_path: skforecast/skforecast/model_selection_multiseries/tests/test_bayesian_search_forecaster_multiseries.py
imports: import re
  import pytest
  import numpy
  import pandas
  from sklearn.linear_model import Ridge
  from skforecast.ForecasterAutoregMultiSeries import ForecasterAutoregMultiSeries
  from skforecast.ForecasterAutoregMultiSeriesCustom import ForecasterAutoregMultiSeriesCustom
  from skforecast.ForecasterAutoregMultiVariate import ForecasterAutoregMultiVariate
  from skforecast.model_selection_multiseries import bayesian_search_forecaster_multiseries
  from skforecast.model_selection_multiseries import bayesian_search_forecaster_multivariate
  from .fixtures_model_selection_multiseries import series
label_desc: Use image node_id 4 for calling a global function with example usage: test_results_output_bayesian_search_forecaster_multiseries_optuna_engine_ForecasterAutoregMultiSeries_with_mocked() and returns: search_space