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 MetadataParam values to the given object.
  If an expected attribute value is provided, the value is unchanged. Otherwise the default value for it is used.
  Other attributes are untouched.
  If the input object is None, it creates a MetadataParam object.
  
  Parameters
  ----------
  metadata : `~greykite.framework.templates.autogen.forecast_config.MetadataParam` or None
      The MetadataParam object.
  
  Returns
  -------
  metadata : `~greykite.framework.templates.autogen.forecast_config.MetadataParam`
      Valid MetadataParam object with the provided attribute values and the default attribute values if not.
docstr_tok: ["Applies","the","default","MetadataParam","values","to","the","given","object",".","If","an","expected","attribute","value","is","provided",",","the","value","is","unchanged",".","Otherwise","the","default","value","for","it","is","used",".","Other","attributes","are","untouched",".","If","the","input","object","is","None",",","it","creates","a","MetadataParam","object",".","Parameters","--","--","--","--","--","metadata",":","`","~greykite.framework.templates.autogen.forecast_config.MetadataParam","`","or","None","The","MetadataParam","object",".","Returns","--","--","--","-","metadata",":","`","~greykite.framework.templates.autogen.forecast_config.MetadataParam","`","Valid","MetadataParam","object","with","the","provided","attribute","values","and","the","default","attribute","values","if","not","."]
code: def apply_metadata_defaults(
      metadata: Optional[MetadataParam] = None,
  ) -> MetadataParam:
      """Applies the default MetadataParam values to the given object.
      If an expected attribute value is provided, the value is unchanged. Otherwise the default value for it is used.
      Other attributes are untouched.
      If the input object is None, it creates a MetadataParam object.
  
      Parameters
      ----------
      metadata : `~greykite.framework.templates.autogen.forecast_config.MetadataParam` or None
          The MetadataParam object.
  
      Returns
      -------
      metadata : `~greykite.framework.templates.autogen.forecast_config.MetadataParam`
          Valid MetadataParam object with the provided attribute values and the default attribute values if not.
      """
      if metadata is None:
          metadata = MetadataParam()
      if metadata.time_col is None:
          metadata.time_col = TIME_COL
      if metadata.value_col is None:
          metadata.value_col = VALUE_COL
      return metadata
  
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 4 for calling the ForecastConfigDefaults obj's underlying member method code with example usage: obj.apply_metadata_defaults(metadata) and returns: metadata