code: def test_output_evaluate_grid_hyperparameters_multiseries_ForecasterAutoregMultiSeriesCustom_levels_str_list_with_mocked(
      levels,
  ):
      """
      Test output of _evaluate_grid_hyperparameters_multiseries in ForecasterAutoregMultiSeriesCustom
      with mocked when `levels` is a `str` or a `list` (mocked done in Skforecast v0.5.0).
      """
      forecaster = ForecasterAutoregMultiSeriesCustom(
          regressor=Ridge(random_state=123),
          fun_predictors=create_predictors,
          window_size=4,
          transformer_series=None,
      )
  
      steps = 3
      n_validation = 12
      param_grid = [{"alpha": 0.01}, {"alpha": 0.1}, {"alpha": 1}]
  
      results = _evaluate_grid_hyperparameters_multiseries(
          forecaster=forecaster,
          series=series,
          param_grid=param_grid,
          steps=steps,
          metric="mean_absolute_error",
          initial_train_size=len(series) - n_validation,
          fixed_train_size=False,
          levels=levels,
          exog=None,
          lags_grid=None,
          refit=False,
          return_best=False,
          verbose=False,
      )
  
      expected_results = pd.DataFrame(
          {
              "levels": [["l1"], ["l1"], ["l1"]],
              "lags": [
                  "custom predictors",
                  "custom predictors",
                  "custom predictors",
              ],
              "params": [{"alpha": 0.01}, {"alpha": 0.1}, {"alpha": 1}],
              "mean_absolute_error": np.array(
                  [
                      0.20669393332187616,
                      0.20671040715338015,
                      0.20684013292264494,
                  ]
              ),
              "alpha": np.array([0.01, 0.1, 1.0]),
          },
          index=pd.Index([0, 1, 2], dtype="int64"),
      )
  
      pd.testing.assert_frame_equal(results, expected_results)
  
imports: import re
  import pytest
  import numpy
  import pandas
  from sklearn.linear_model import Ridge
  from sklearn.metrics import mean_absolute_error
  from sklearn.metrics import mean_squared_error
  from skforecast.ForecasterAutoregMultiSeries import ForecasterAutoregMultiSeries
  from skforecast.ForecasterAutoregMultiSeriesCustom import ForecasterAutoregMultiSeriesCustom
  from skforecast.ForecasterAutoregMultiVariate import ForecasterAutoregMultiVariate
  from skforecast.model_selection_multiseries.model_selection_multiseries import _evaluate_grid_hyperparameters_multiseries
  from tqdm import tqdm
  from functools import partialmethod
  from .fixtures_model_selection_multiseries import series
label_desc: Use image node_id 11 for calling a global function with example usage: test_output_evaluate_grid_hyperparameters_multiseries_ForecasterAutoregMultiSeriesCustom_levels_str_list_with_mocked(levels) without return types