code: def test_run_hyperparameter_searcher():
      """Tests running hyperparameter_grid search using
      `get_hyperparameter_searcher` output
      """
      # Grid search with explicit hyperparameter_grid and standard `score_func`
      hyperparameter_grid = [
          {
              "strategy": ["mean", "median", "quantile"],
              "quantile": [0.8],
          },
          {"strategy": ["constant"], "constant": [1, 3, 4, 5, 10]},
      ]
      with pytest.warns(UserWarning) as record:
          # full hyperparameter_grid search
          metric = EvaluationMetricEnum.MeanAbsolutePercentError
          grid_search = run_dummy_grid_search(
              hyperparameter_grid, score_func=metric.name
          )
          assert_proper_grid_search(
              grid_search,
              expected_grid_size=8,
              lower_bound=0.0,  # MAPE is reported with original sign
              score_func=metric.name,
              greater_is_better=metric.get_metric_greater_is_better(),
          )
          # limited hyperparameter_grid search
          grid_search = run_dummy_grid_search(
              hyperparameter_grid,
              score_func=metric.name,
              hyperparameter_budget=1,
          )
          assert_proper_grid_search(
              grid_search,
              expected_grid_size=1,
              lower_bound=0.0,  # MAPE is repored with original sign
              score_func=metric.name,
              greater_is_better=metric.get_metric_greater_is_better(),
          )
          assert (
              "There is only one CV split" in record[0].message.args[0]
          )
  
      # Grid search with random hyperparameter_grid,
      # custom `score_func`, and additional report metrics
      random_hyperparameter_grid = [
          {
              "strategy": ["mean", "median", "quantile"],
              "quantile": [0.8],
          },
          {"strategy": ["constant"], "constant": sp_randint(1, 30)},
      ]
      with pytest.warns(
          UserWarning, match="There is only one CV split"
      ):
          # full hyperparameter_grid search, default 10
          grid_search = run_dummy_grid_search(
              random_hyperparameter_grid,
              score_func=mean_squared_error,
              score_func_greater_is_better=False,
              agg_periods=7,
              agg_func=np.sum,
              cv_report_metrics=CV_REPORT_METRICS_ALL,
              relative_error_tolerance=0.05,
              n_jobs=-1,
          )  # test parallelism
          expected_names = [
              enum.get_metric_name() for enum in EvaluationMetricEnum
          ] + [CUSTOM_SCORE_FUNC_NAME, FRACTION_OUTSIDE_TOLERANCE_NAME]
          assert_proper_grid_search(
              grid_search,
              expected_grid_size=10,
              lower_bound=0.0,
              score_func=mean_squared_error,
              greater_is_better=False,
              cv_report_metrics_names=expected_names,
          )
          # checks if custom metrics are properly calculated
          assert_equal(
              grid_search.cv_results_[
                  f"mean_test_{FRACTION_OUTSIDE_TOLERANCE_NAME}"
              ],
              grid_search.cv_results_[
                  f"mean_test_{EvaluationMetricEnum.FractionOutsideTolerance5.get_metric_name()}"
              ],
          )
          assert_equal(
              grid_search.cv_results_[
                  f"mean_test_{CUSTOM_SCORE_FUNC_NAME}"
              ],
              grid_search.cv_results_[
                  f"mean_test_{EvaluationMetricEnum.MeanSquaredError.get_metric_name()}"
              ],
          )
  
          # limited hyperparameter_grid search
          grid_search = run_dummy_grid_search(
              random_hyperparameter_grid,
              hyperparameter_budget=2,
              score_func=mean_squared_error,
              agg_periods=7,
              agg_func=np.sum,
              cv_report_metrics=CV_REPORT_METRICS_ALL,
              relative_error_tolerance=0.05,
              n_jobs=-1,
          )
          assert_proper_grid_search(
              grid_search,
              expected_grid_size=2,
              lower_bound=0.0,
              score_func=mean_squared_error,
              greater_is_better=False,
              cv_report_metrics_names=expected_names,
          )
  
imports: import sys
  import warnings
  from functools import partial
  import numpy
  import pandas
  import pytest
  from scipy.stats import randint
  from sklearn.metrics import mean_absolute_error
  from sklearn.metrics import mean_squared_error
  from sklearn.metrics import median_absolute_error
  from sklearn.pipeline import Pipeline
  from testfixtures import LogCapture
  from greykite.common import constants
  from greykite.common.constants import FRACTION_OUTSIDE_TOLERANCE
  from greykite.common.constants import LOGGER_NAME
  from greykite.common.evaluation import EvaluationMetricEnum
  from greykite.common.evaluation import add_preaggregation_to_scorer
  from greykite.common.evaluation import fraction_outside_tolerance
  from greykite.common.python_utils import assert_equal
  from greykite.common.testing_utils import assert_eval_function_equal
  from greykite.common.testing_utils import generate_df_for_tests
  from greykite.common.testing_utils import generate_df_with_reg_for_tests
  from greykite.framework.constants import CUSTOM_SCORE_FUNC_NAME
  from greykite.framework.constants import CV_REPORT_METRICS_ALL
  from greykite.framework.constants import FRACTION_OUTSIDE_TOLERANCE_NAME
  from greykite.framework.pipeline.utils import get_basic_pipeline
  from greykite.framework.pipeline.utils import get_best_index
  from greykite.framework.pipeline.utils import get_default_time_parameters
  from greykite.framework.pipeline.utils import get_forecast
  from greykite.framework.pipeline.utils import get_hyperparameter_searcher
  from greykite.framework.pipeline.utils import get_score_func_with_aggregation
  from greykite.framework.pipeline.utils import get_scoring_and_refit
  from greykite.framework.utils.framework_testing_utils import assert_proper_grid_search
  from greykite.framework.utils.framework_testing_utils import assert_refit
  from greykite.framework.utils.framework_testing_utils import assert_scoring
  from greykite.sklearn.cross_validation import RollingTimeSeriesSplit
  from greykite.sklearn.estimator.null_model import DummyEstimator
  from greykite.sklearn.estimator.prophet_estimator import ProphetEstimator
  from greykite.sklearn.estimator.silverkite_estimator import SilverkiteEstimator
  from greykite.sklearn.transform.column_selector import ColumnSelector
label_desc: Use image node_id 11 for calling a global function with example usage: test_run_hyperparameter_searcher() without return types