class_docstr: The model template for Multistage Forecast Estimator.
class_docstr_tok: ["The","model","template","for","Multistage","Forecast","Estimator","."]
docstr: Extracts template class (e.g. `SimpleSilverkiteTemplate`) from the config.
  Currently only supports single templates in
  `~greykite.framework.templates.model_templates.ModelTemplateEnum`.
  
  Parameters
  ----------
  config : :class:`~greykite.framework.templates.model_templates.ForecastConfig` or None
      Config object for template class to use.
      See :class:`~greykite.framework.templates.model_templates.ForecastConfig`.
  
  Returns
  -------
  template_class : Type[`~greykite.framework.templates.base_template.BaseTemplate`]
      An implementation of `~greykite.framework.templates.template_interface.TemplateInterface`.
docstr_tok: ["Extracts","template","class","(","e.g",".","`","SimpleSilverkiteTemplate","`",")","from","the","config",".","Currently","only","supports","single","templates","in","`","~greykite.framework.templates.model_templates.ModelTemplateEnum","`",".","Parameters","--","--","--","--","--","config",":",":","class",":","`","~greykite.framework.templates.model_templates.ForecastConfig","`","or","None","Config","object","for","template","class","to","use",".","See",":","class",":","`","~greykite.framework.templates.model_templates.ForecastConfig","`",".","Returns","--","--","--","-","template_class",":","Type","[","`","~greykite.framework.templates.base_template.BaseTemplate","`","]","An","implementation","of","`","~greykite.framework.templates.template_interface.TemplateInterface","`","."]
code: def __get_template_class(
      self, config: ForecastConfig = None
  ) -> Type[BaseTemplate]:
      """Extracts template class (e.g. `SimpleSilverkiteTemplate`) from the config.
      Currently only supports single templates in
      `~greykite.framework.templates.model_templates.ModelTemplateEnum`.
  
      Parameters
      ----------
      config : :class:`~greykite.framework.templates.model_templates.ForecastConfig` or None
          Config object for template class to use.
          See :class:`~greykite.framework.templates.model_templates.ForecastConfig`.
  
      Returns
      -------
      template_class : Type[`~greykite.framework.templates.base_template.BaseTemplate`]
          An implementation of `~greykite.framework.templates.template_interface.TemplateInterface`.
      """
      model_template_enum = (
          self._constants.MultistageForecastModelTemplateEnum
      )
      valid_names = list(model_template_enum.__members__.keys())
      if config.model_template not in valid_names:
          raise ValueError(
              f"Currently Multistage Forecast only supports a known string of single model template. "
              f"Model Template '{config.model_template}' is not recognized! Must be one of: {valid_names}."
          )
      template_class = model_template_enum[config.model_template].value
      return template_class
  
imports: from itertools import product
  from typing import Dict
  from typing import List
  from typing import Type
  import pandas
  from greykite.common import constants
  from greykite.common.logging import LoggingLevelEnum
  from greykite.common.logging import log_message
  from greykite.common.python_utils import unique_in_list
  from greykite.common.python_utils import update_dictionaries
  from greykite.framework.templates.autogen.forecast_config import ForecastConfig
  from greykite.framework.templates.autogen.forecast_config import MetadataParam
  from greykite.framework.templates.base_template import BaseTemplate
  from greykite.framework.templates.multistage_forecast_template_config import MultistageForecastTemplateConfig
  from greykite.framework.templates.multistage_forecast_template_config import MultistageForecastTemplateConstants
  from greykite.sklearn.estimator.base_forecast_estimator import BaseForecastEstimator
  from greykite.sklearn.estimator.multistage_forecast_estimator import MultistageForecastEstimator
  from greykite.sklearn.estimator.multistage_forecast_estimator import MultistageForecastModelConfig
label_desc: Use image node_id 13 for calling the MultistageForecastTemplate obj's underlying member method code with example usage: obj.__get_template_class(config) and returns: template_class