code: def test_get_template_class():
      """Tests `__get_template_class`"""
      forecaster = Forecaster()
      assert (
          forecaster._Forecaster__get_template_class()
          == SimpleSilverkiteTemplate
      )
      assert (
          forecaster._Forecaster__get_template_class(
              config=ForecastConfig(
                  model_template=ModelTemplateEnum.SILVERKITE_WEEKLY.name
              )
          )
          == SimpleSilverkiteTemplate
      )
      if "prophet" in sys.modules:
          assert (
              forecaster._Forecaster__get_template_class(
                  config=ForecastConfig(
                      model_template=ModelTemplateEnum.PROPHET.name
                  )
              )
              == ProphetTemplate
          )
      assert (
          forecaster._Forecaster__get_template_class(
              config=ForecastConfig(
                  model_template=ModelTemplateEnum.SK.name
              )
          )
          == SilverkiteTemplate
      )
  
      # list `model_template`
      model_template = [
          ModelTemplateEnum.SILVERKITE.name,
          ModelTemplateEnum.SILVERKITE_DAILY_90.name,
          SimpleSilverkiteTemplateOptions(),
      ]
      forecaster = Forecaster()
      assert (
          forecaster._Forecaster__get_template_class(
              config=ForecastConfig(model_template=model_template)
          )
          == SimpleSilverkiteTemplate
      )
  
      # `model_template` name is wrong
      model_template = "SOME_TEMPLATE"
      with pytest.raises(
          ValueError,
          match=f"Model Template '{model_template}' is not recognized! "
          f"Must be one of: SILVERKITE, "
          f"SILVERKITE_DAILY_1_CONFIG_1, SILVERKITE_DAILY_1_CONFIG_2, SILVERKITE_DAILY_1_CONFIG_3, "
          f"SILVERKITE_DAILY_1, SILVERKITE_DAILY_90, "
          f"SILVERKITE_WEEKLY, SILVERKITE_MONTHLY, SILVERKITE_HOURLY_1, SILVERKITE_HOURLY_24, "
          f"SILVERKITE_HOURLY_168, SILVERKITE_HOURLY_336, SILVERKITE_EMPTY",
      ):
          forecaster = Forecaster()
          forecaster._Forecaster__get_template_class(
              config=ForecastConfig(model_template=model_template)
          )
  
      # List of `model_template` that include names not compatible with `SimpleSilverkiteTemplate`.
      model_template = [
          ModelTemplateEnum.SK.name,
          ModelTemplateEnum.SILVERKITE.name,
          ModelTemplateEnum.SILVERKITE_DAILY_90.name,
          SimpleSilverkiteTemplateOptions(),
      ]
      with pytest.raises(
          ValueError,
          match="All model templates must use the same template class",
      ):
          forecaster = Forecaster()
          forecaster._Forecaster__get_template_class(
              config=ForecastConfig(model_template=model_template)
          )
  
      # list of `model_template` not supported by template class
      model_template = [
          ModelTemplateEnum.SK.name,
          ModelTemplateEnum.SK.name,
      ]
      with pytest.raises(
          ValueError,
          match="The template class <class "
          "'greykite.framework.templates.silverkite_template.SilverkiteTemplate'> "
          "does not allow `model_template` to be a list",
      ):
          forecaster = Forecaster()
          forecaster._Forecaster__get_template_class(
              config=ForecastConfig(model_template=model_template)
          )
  
      # List of `model_components_param` not compatible with `model_template`.
      model_template = ModelTemplateEnum.SK.name
      config = ForecastConfig(
          model_template=model_template,
          model_components_param=[
              ModelComponentsParam(),
              ModelComponentsParam(),
          ],
      )
      with pytest.raises(
          ValueError,
          match=f"Model template {model_template} does not support a list of `ModelComponentsParam`.",
      ):
          forecaster = Forecaster()
          forecaster._Forecaster__get_template_class(config=config)
  
      # List of a single `model_components_param` is acceptable for a model template
      # that does not accept multiple `model_components_param`.
      forecaster = Forecaster()
      config = ForecastConfig(
          model_template=model_template,
          model_components_param=[ModelComponentsParam()],
      )
      forecaster._Forecaster__get_template_class(config=config)
      # List of multiple `model_components_param` is accepted by SILVERKITE
      config = ForecastConfig(
          model_template=ModelTemplateEnum.SILVERKITE.name,
          model_components_param=[
              ModelComponentsParam(),
              ModelComponentsParam(),
          ],
      )
      forecaster._Forecaster__get_template_class(config=config)
  
      # Error for unrecognized model template when there is no simple silverkite template
      model_template = "UNKNOWN"
      with pytest.raises(
          ValueError,
          match=rf"Model Template '{model_template}' is not recognized! "
          rf"Must be one of: SK, PROPHET\.",
      ):
          forecaster = Forecaster(
              model_template_enum=MissingSimpleSilverkiteTemplateEnum,
              default_model_template_name="SK",
          )
          forecaster._Forecaster__get_template_class(
              config=ForecastConfig(model_template=model_template)
          )
  
      # Custom `model_template_enum`
      forecaster = Forecaster(
          model_template_enum=MyModelTemplateEnum,
          default_model_template_name="MYSILVERKITE",
      )
      assert (
          forecaster._Forecaster__get_template_class()
          == MySimpleSilverkiteTemplate
      )
  
      if "prophet" in sys.modules:
          model_template = (
              ModelTemplateEnum.PROPHET.name
          )  # `model_template` name is wrong
          with pytest.raises(
              ValueError,
              match=f"Model Template '{model_template}' is not recognized! "
              f"Must be one of: MYSILVERKITE, SILVERKITE or satisfy the `SimpleSilverkiteTemplate` rules.",
          ):
              forecaster._Forecaster__get_template_class(
                  config=ForecastConfig(model_template=model_template)
              )
  
      model_template = SimpleSilverkiteTemplateOptions()  # dataclass
      with LogCapture(LOGGER_NAME) as log_capture:
          forecaster._Forecaster__get_template_class(
              config=ForecastConfig(model_template=model_template)
          )
          log_capture.check(
              (
                  LOGGER_NAME,
                  "DEBUG",
                  "Model template SimpleSilverkiteTemplateOptions(freq=<SILVERKITE_FREQ.DAILY: "
                  "'DAILY'>, seas=<SILVERKITE_SEAS.LT: 'LT'>, gr=<SILVERKITE_GR.LINEAR: "
                  "'LINEAR'>, cp=<SILVERKITE_CP.NONE: 'NONE'>, hol=<SILVERKITE_HOL.NONE: "
                  "'NONE'>, feaset=<SILVERKITE_FEASET.OFF: 'OFF'>, "
                  "algo=<SILVERKITE_ALGO.LINEAR: 'LINEAR'>, ar=<SILVERKITE_AR.OFF: 'OFF'>, "
                  "dsi=<SILVERKITE_DSI.AUTO: 'AUTO'>, wsi=<SILVERKITE_WSI.AUTO: 'AUTO'>) is "
                  "not found in the template enum. Checking if model template is suitable for "
                  "`SimpleSilverkiteTemplate`.",
              ),
              (
                  LOGGER_NAME,
                  "DEBUG",
                  "Multiple template classes could be used for the model template "
                  "SimpleSilverkiteTemplateOptions(freq=<SILVERKITE_FREQ.DAILY: 'DAILY'>, "
                  "seas=<SILVERKITE_SEAS.LT: 'LT'>, gr=<SILVERKITE_GR.LINEAR: 'LINEAR'>, "
                  "cp=<SILVERKITE_CP.NONE: 'NONE'>, hol=<SILVERKITE_HOL.NONE: 'NONE'>, "
                  "feaset=<SILVERKITE_FEASET.OFF: 'OFF'>, algo=<SILVERKITE_ALGO.LINEAR: "
                  "'LINEAR'>, ar=<SILVERKITE_AR.OFF: 'OFF'>, dsi=<SILVERKITE_DSI.AUTO: "
                  "'AUTO'>, wsi=<SILVERKITE_WSI.AUTO: 'AUTO'>): [<class "
                  "'test_forecaster.MySimpleSilverkiteTemplate'>, <class "
                  "'greykite.framework.templates.simple_silverkite_template.SimpleSilverkiteTemplate'>]",
              ),
              (
                  LOGGER_NAME,
                  "DEBUG",
                  "Using template class <class 'test_forecaster.MySimpleSilverkiteTemplate'> "
                  "for the model template "
                  "SimpleSilverkiteTemplateOptions(freq=<SILVERKITE_FREQ.DAILY: 'DAILY'>, "
                  "seas=<SILVERKITE_SEAS.LT: 'LT'>, gr=<SILVERKITE_GR.LINEAR: 'LINEAR'>, "
                  "cp=<SILVERKITE_CP.NONE: 'NONE'>, hol=<SILVERKITE_HOL.NONE: 'NONE'>, "
                  "feaset=<SILVERKITE_FEASET.OFF: 'OFF'>, algo=<SILVERKITE_ALGO.LINEAR: "
                  "'LINEAR'>, ar=<SILVERKITE_AR.OFF: 'OFF'>, dsi=<SILVERKITE_DSI.AUTO: "
                  "'AUTO'>, wsi=<SILVERKITE_WSI.AUTO: 'AUTO'>)",
              ),
          )
  
imports: import sys
  import warnings
  from enum import Enum
  import numpy
  import pandas
  import pytest
  from testfixtures import LogCapture
  from greykite.common.constants import LOGGER_NAME
  from greykite.common.constants import PREDICTED_LOWER_COL
  from greykite.common.constants import PREDICTED_UPPER_COL
  from greykite.common.constants import TIME_COL
  from greykite.common.constants import VALUE_COL
  from greykite.common.data_loader import DataLoader
  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.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 ModelTemplate
  from greykite.framework.templates.model_templates import ModelTemplateEnum
  from greykite.framework.templates.prophet_template import ProphetTemplate
  from greykite.framework.templates.silverkite_template import SilverkiteTemplate
  from greykite.framework.templates.simple_silverkite_template import SimpleSilverkiteTemplate
  from greykite.framework.templates.simple_silverkite_template_config import SILVERKITE_COMPONENT_KEYWORDS
  from greykite.framework.templates.simple_silverkite_template_config import SimpleSilverkiteTemplateOptions
  from greykite.framework.utils.framework_testing_utils import assert_basic_pipeline_equal
  from greykite.framework.utils.framework_testing_utils import assert_forecast_pipeline_result_equal
  from greykite.framework.utils.framework_testing_utils import check_forecast_pipeline_result
  from greykite.framework.utils.result_summary import summarize_grid_search_results
label_desc: Use image node_id 4 for calling a global function with example usage: test_get_template_class() without return types