code: def test_prophet_hyperparameter_grid_warn():
      """Tests get_prophet_hyperparameter_grid warnings"""
      # holiday params
      start_year = 2018
      end_year = 2022
      holiday_pre_num_days = [1, 2, 3, 4]
      holiday_post_num_days = [1, 2, 3, 4]
      holiday_lookup_countries = [
          ["UnitedStates"],
          ["UnitedStates", "China", "India"],
      ]
      holidays_prior_scale = [5.0, 10.0, 15.0]
      events = {
          "holiday_lookup_countries": holiday_lookup_countries,
          "holiday_pre_num_days": holiday_pre_num_days,
          "holiday_post_num_days": holiday_post_num_days,
          "start_year": start_year,
          "end_year": end_year,
          "holidays_prior_scale": holidays_prior_scale,
      }
      model_components = ModelComponentsParam(events=events)
      with pytest.warns(Warning) as record:
          template = ProphetTemplate()
          template.config = template.apply_forecast_config_defaults()
          template.config.model_components_param = model_components
          template.get_hyperparameter_grid()
          assert (
              f"`events['holiday_pre_num_days']` list has more than 1 element. "
              f"We currently support only 1 element. "
              f"Using 1." in record[0].message.args[0]
          )
          assert (
              f"`events['holiday_post_num_days']` list has more than 1 element. "
              f"We currently support only 1 element. "
              f"Using 1." in record[1].message.args[0]
          )
          # Extra spaces for holidays to align with actual warning in the function, because of an extra tab.
          assert (
              f"`events['holiday_lookup_countries']` contains multiple options. "
              f"We currently support only 1 option. Using ['UnitedStates']."
              in record[2].message.args[0]
          )
  
      # other invalid holiday_lookup_countries
      with pytest.warns(Warning) as record:
          events["holiday_pre_num_days"] = [1]
          events["holiday_post_num_days"] = [0]
          events["holiday_lookup_countries"] = ["auto", None]
          model_components = ModelComponentsParam(events=events)
          template = ProphetTemplate()
          template.config = template.apply_forecast_config_defaults()
          template.config.model_components_param = model_components
          template.get_hyperparameter_grid()
          assert (
              f"`events['holiday_lookup_countries']` contains multiple options. "
              f"We currently support only 1 option. Using auto."
              in record[0].message.args[0]
          )
  
      # no warning if only one list of holiday_lookup_countries is provided
      with pytest.warns(None):
          events["holiday_pre_num_days"] = [1]
          events["holiday_post_num_days"] = [0]
          events["holiday_lookup_countries"] = [
              ["UnitedStates", "China", "UnitedKingdom", "India"]
          ]
          template = ProphetTemplate()
          template.config = template.apply_forecast_config_defaults()
          template.config.model_components_param = ModelComponentsParam(
              events=events
          )
          hyp1 = template.get_hyperparameter_grid()
  
          events["holiday_lookup_countries"] = [
              "UnitedStates",
              "China",
              "UnitedKingdom",
              "India",
          ]
          template = ProphetTemplate()
          template.config = template.apply_forecast_config_defaults()
          template.config.model_components_param = ModelComponentsParam(
              events=events
          )
          hyp2 = template.get_hyperparameter_grid()
          assert_equal(hyp1, hyp2)
  
imports: import datetime
  import sys
  import warnings
  import numpy
  import pandas
  import pytest
  from pandas.testing import assert_frame_equal
  import greykite.common.constants
  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.prophet_template import ProphetTemplate
  from greykite.framework.utils.framework_testing_utils import assert_basic_pipeline_equal
  from greykite.sklearn.estimator.prophet_estimator import ProphetEstimator
label_desc: Use image node_id 9 for calling a global function with example usage: test_prophet_hyperparameter_grid_warn() without return types