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 EvaluationMetricParam 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 EvaluationMetricParam object.
  
  Parameters
  ----------
  evaluation : `~greykite.framework.templates.autogen.forecast_config.EvaluationMetricParam` or None
      The EvaluationMetricParam object.
  
  Returns
  -------
  evaluation : `~greykite.framework.templates.autogen.forecast_config.EvaluationMetricParam`
      Valid EvaluationMetricParam object with the provided attribute values and the default attribute values if not.
docstr_tok: ["Applies","the","default","EvaluationMetricParam","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","EvaluationMetricParam","object",".","Parameters","--","--","--","--","--","evaluation",":","`","~greykite.framework.templates.autogen.forecast_config.EvaluationMetricParam","`","or","None","The","EvaluationMetricParam","object",".","Returns","--","--","--","-","evaluation",":","`","~greykite.framework.templates.autogen.forecast_config.EvaluationMetricParam","`","Valid","EvaluationMetricParam","object","with","the","provided","attribute","values","and","the","default","attribute","values","if","not","."]
code: def apply_evaluation_metric_defaults(
      evaluation: Optional[EvaluationMetricParam] = None,
  ) -> EvaluationMetricParam:
      """Applies the default EvaluationMetricParam 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 EvaluationMetricParam object.
  
      Parameters
      ----------
      evaluation : `~greykite.framework.templates.autogen.forecast_config.EvaluationMetricParam` or None
          The EvaluationMetricParam object.
  
      Returns
      -------
      evaluation : `~greykite.framework.templates.autogen.forecast_config.EvaluationMetricParam`
          Valid EvaluationMetricParam object with the provided attribute values and the default attribute values if not.
      """
      if evaluation is None:
          evaluation = EvaluationMetricParam()
      if evaluation.cv_selection_metric is None:
          # NB: subclass may want to override, if designed for a different objective (e.g. quantile loss)
          evaluation.cv_selection_metric = (
              EvaluationMetricEnum.MeanAbsolutePercentError.name
          )
      if evaluation.cv_report_metrics is None:
          evaluation.cv_report_metrics = CV_REPORT_METRICS_ALL
      return evaluation
  
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 2 for calling the ForecastConfigDefaults obj's underlying member method code with example usage: obj.apply_evaluation_metric_defaults(evaluation) and returns: evaluation