class_docstr: Class that applies default values to a
  `~greykite.framework.templates.autogen.forecast_config.ForecastConfig` object.
  
  Provides these methods:
  
      - apply_metadata_defaults
      - apply_evaluation_metric_defaults
      - apply_evaluation_period_defaults
      - apply_computation_defaults
      - apply_model_components_defaults
      - apply_forecast_config_defaults
  
  Subclasses may override these if different defaults are desired.
docstr: Applies the default model template to the given object.
  
  Unpacks a list of a single element to the element itself.
  Sets default value if None.
  
  Parameters
  ----------
  model_template : `str` or None or `list` [None, `str`]
      The model template name.
      See valid names in `~greykite.framework.templates.model_templates.ModelTemplateEnum`.
  
  Returns
  -------
  model_template : `str` or `list` [`str`]
      The model template name, with defaults value used if not provided.
docstr_tok: ["Applies","the","default","model","template","to","the","given","object",".","Unpacks","a","list","of","a","single","element","to","the","element","itself",".","Sets","default","value","if","None",".","Parameters","--","--","--","--","--","model_template",":","`","str","`","or","None","or","`","list","`","[","None",",","`","str","`","]","The","model","template","name",".","See","valid","names","in","`","~greykite.framework.templates.model_templates.ModelTemplateEnum","`",".","Returns","--","--","--","-","model_template",":","`","str","`","or","`","list","`","[","`","str","`","]","The","model","template","name",",","with","defaults","value","used","if","not","provided","."]
code: def apply_model_template_defaults(
      self,
      model_template: Optional[Union[str, List[Optional[str]]]] = None,
  ) -> Union[str, List[str]]:
      """Applies the default model template to the given object.
  
      Unpacks a list of a single element to the element itself.
      Sets default value if None.
  
      Parameters
      ----------
      model_template : `str` or None or `list` [None, `str`]
          The model template name.
          See valid names in `~greykite.framework.templates.model_templates.ModelTemplateEnum`.
  
      Returns
      -------
      model_template : `str` or `list` [`str`]
          The model template name, with defaults value used if not provided.
      """
      # Converts single element to a list
      if not isinstance(model_template, list):
          model_template = [model_template]
      model_template = [
          m if m is not None else self.DEFAULT_MODEL_TEMPLATE
          for m in model_template
      ]
      if isinstance(model_template, list) and len(model_template) == 1:
          # model_template can be provided as a list or a single element.
          # A list of a single element is unpacked to that element.
          # (Some template classes like SilverkiteTemplate do not allow model_template
          # to be a list.)
          model_template = model_template[0]
      return model_template
  
imports: import dataclasses
  from typing import List
  from typing import Optional
  from typing import Union
  from greykite.common.constants import TIME_COL
  from greykite.common.constants import VALUE_COL
  from greykite.common.evaluation import EvaluationMetricEnum
  from greykite.framework.constants import COMPUTATION_N_JOBS
  from greykite.framework.constants import COMPUTATION_VERBOSE
  from greykite.framework.constants import CV_REPORT_METRICS_ALL
  from greykite.framework.constants import EVALUATION_PERIOD_CV_MAX_SPLITS
  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
label_desc: Use image node_id 6 for calling the ForecastConfigDefaults obj's underlying member method code with example usage: obj.apply_model_template_defaults(model_template) and returns: model_template