code: def test_get_silverkite_hyperparameter_grid(
      model_components_param, silverkite
  ):
      template = SilverkiteTemplate()
      template.config = template.apply_forecast_config_defaults()
      hyperparameter_grid = template.get_hyperparameter_grid()
      expected_grid = {
          "estimator__silverkite": [SilverkiteForecast()],
          "estimator__origin_for_time_vars": [None],
          "estimator__extra_pred_cols": [["ct1"]],
          "estimator__drop_pred_cols": [None],
          "estimator__explicit_pred_cols": [None],
          "estimator__train_test_thresh": [None],
          "estimator__training_fraction": [None],
          "estimator__fit_algorithm_dict": [
              {"fit_algorithm": "linear", "fit_algorithm_params": None}
          ],
          "estimator__daily_event_df_dict": [None],
          "estimator__daily_event_neighbor_impact": [None],
          "estimator__daily_event_shifted_effect": [None],
          "estimator__fs_components_df": [
              pd.DataFrame(
                  {
                      "name": ["tod", "tow", "tom", "toq", "toy"],
                      "period": [24.0, 7.0, 1.0, 1.0, 1.0],
                      "order": [3, 3, 1, 1, 5],
                      "seas_names": [
                          "daily",
                          "weekly",
                          "monthly",
                          "quarterly",
                          "yearly",
                      ],
                  }
              )
          ],
          "estimator__autoreg_dict": [None],
          "estimator__simulation_num": [10],
          "estimator__fast_simulation": [False],
          "estimator__lagged_regressor_dict": [None],
          "estimator__changepoints_dict": [None],
          "estimator__seasonality_changepoints_dict": [None],
          "estimator__changepoint_detector": [None],
          "estimator__min_admissible_value": [None],
          "estimator__max_admissible_value": [None],
          "estimator__normalize_method": [None],
          "estimator__regression_weight_col": [None],
          "estimator__remove_intercept": [False],
          "estimator__uncertainty_dict": [None],
      }
      assert_equal(
          hyperparameter_grid,
          expected_grid,
          ignore_keys={"estimator__silverkite": None},
      )
      assert (
          hyperparameter_grid["estimator__silverkite"][0] != silverkite
      )
  
      # Tests auto-list conversion
      template.config.model_components_param = model_components_param
      template.time_properties = {"origin_for_time_vars": 2020}
      hyperparameter_grid = template.get_hyperparameter_grid()
      expected_grid = {
          "estimator__silverkite": [silverkite],
          "estimator__origin_for_time_vars": [2020],
          "estimator__extra_pred_cols": [
              ["ct1"],
              ["ct2"],
              ["regressor1", "regressor3"],
          ],
          "estimator__drop_pred_cols": [None],
          "estimator__explicit_pred_cols": [None],
          "estimator__train_test_thresh": [None],
          "estimator__training_fraction": [None],
          "estimator__fit_algorithm_dict": [
              {
                  "fit_algorithm": "linear",
                  "fit_algorithm_params": None,
              }
          ],
          "estimator__daily_event_df_dict": [None],
          "estimator__daily_event_neighbor_impact": [None],
          "estimator__daily_event_shifted_effect": [None],
          "estimator__fs_components_df": [None],
          "estimator__autoreg_dict": [None],
          "estimator__simulation_num": [10],
          "estimator__fast_simulation": [False],
          "estimator__lagged_regressor_dict": [None],
          "estimator__changepoints_dict": [
              {
                  "method": "uniform",
                  "n_changepoints": 20,
              }
          ],
          "estimator__seasonality_changepoints_dict": [None],
          "estimator__changepoint_detector": [None],
          "estimator__min_admissible_value": [None],
          "estimator__max_admissible_value": [4],
          "estimator__normalize_method": [None],
          "estimator__regression_weight_col": [None],
          "estimator__remove_intercept": [False],
          "estimator__uncertainty_dict": [
              {"uncertainty_method": "simple_conditional_residuals"}
          ],
      }
      assert_equal(hyperparameter_grid, expected_grid)
  
      # Tests hyperparameter_override
      template.config.model_components_param.hyperparameter_override = [
          {
              "input__response__null__max_frac": 0.1,
              "estimator__min_admissible_value": [2],
              "estimator__extra_pred_cols": [
                  "override_estimator__extra_pred_cols"
              ],
          },
          {},
          {
              "estimator__extra_pred_cols": ["val1", "val2"],
              "estimator__origin_for_time_vars": [2019],
          },
          None,
      ]
      template.time_properties = {"origin_for_time_vars": 2020}
      hyperparameter_grid = template.get_hyperparameter_grid()
      expected_grid["estimator__origin_for_time_vars"] = [2020]
      updated_grid1 = expected_grid.copy()
      updated_grid1["input__response__null__max_frac"] = [0.1]
      updated_grid1["estimator__min_admissible_value"] = [2]
      updated_grid1["estimator__extra_pred_cols"] = [
          ["override_estimator__extra_pred_cols"]
      ]
      updated_grid2 = expected_grid.copy()
      updated_grid2["estimator__extra_pred_cols"] = [["val1", "val2"]]
      updated_grid2["estimator__origin_for_time_vars"] = [2019]
      expected_grid = [
          updated_grid1,
          expected_grid,
          updated_grid2,
          expected_grid,
      ]
      assert_equal(hyperparameter_grid, expected_grid)
  
imports: import dataclasses
  import datetime
  import warnings
  import numpy
  import pandas
  import pytest
  from greykite.algo.forecast.silverkite.forecast_silverkite import SilverkiteForecast
  from greykite.algo.forecast.silverkite.forecast_simple_silverkite_helper import generate_holiday_events
  from greykite.algo.forecast.silverkite.forecast_simple_silverkite_helper import get_event_pred_cols
  from greykite.common.constants import ADJUSTMENT_DELTA_COL
  from greykite.common.constants import END_TIME_COL
  from greykite.common.constants import METRIC_COL
  from greykite.common.constants import PREDICTION_BAND_COVERAGE
  from greykite.common.constants import START_TIME_COL
  from greykite.common.constants import TIME_COL
  from greykite.common.constants import VALUE_COL
  from greykite.common.evaluation import EvaluationMetricEnum
  from greykite.common.python_utils import assert_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 COMPUTATION_N_JOBS
  from greykite.framework.constants import CV_REPORT_METRICS_ALL
  from greykite.framework.templates.autogen.forecast_config import ComputationParam
  from greykite.framework.templates.autogen.forecast_config import EvaluationMetricParam
  from greykite.framework.templates.autogen.forecast_config import EvaluationPeriodParam
  from greykite.framework.templates.autogen.forecast_config import ForecastConfig
  from greykite.framework.templates.autogen.forecast_config import MetadataParam
  from greykite.framework.templates.autogen.forecast_config import ModelComponentsParam
  from greykite.framework.templates.forecaster import Forecaster
  from greykite.framework.templates.model_templates import ModelTemplateEnum
  from greykite.framework.templates.silverkite_template import SilverkiteTemplate
  from greykite.framework.templates.silverkite_template import apply_default_model_components
  from greykite.framework.templates.silverkite_template import get_extra_pred_cols
  from greykite.framework.utils.framework_testing_utils import assert_basic_pipeline_equal
  from greykite.framework.utils.framework_testing_utils import check_forecast_pipeline_result
  from greykite.sklearn.estimator.silverkite_estimator import SilverkiteEstimator
label_desc: Use image node_id 8 for calling a global function with example usage: test_get_silverkite_hyperparameter_grid(model_components_param, silverkite) without return types