code: def assert_forecast_config_json(
      config: Optional[ForecastConfig] = None,
  ):
      """Asserts the forecast config values. This function expects a particular config and is not generic"""
      config = ForecastConfigDefaults().apply_forecast_config_defaults(
          config
      )
      assert config.model_template == ModelTemplateEnum.SILVERKITE.name
      assert config.metadata_param.time_col == "custom_time_col"
      assert config.metadata_param.value_col == VALUE_COL
      assert config.metadata_param.freq is None
      assert config.metadata_param.date_format is None
      assert config.metadata_param.train_end_date is None
      assert config.metadata_param.anomaly_info == [
          {"key": "value"},
          {"key2": "value2"},
      ]
      assert config.evaluation_period_param.test_horizon == 10
      assert (
          config.evaluation_period_param.periods_between_train_test == 5
      )
      assert config.evaluation_period_param.cv_horizon is None
      assert config.evaluation_period_param.cv_min_train_periods == 20
      assert config.evaluation_period_param.cv_expanding_window is True
      assert (
          config.evaluation_period_param.cv_use_most_recent_splits
          is None
      )
      assert (
          config.evaluation_period_param.cv_periods_between_splits
          is None
      )
      assert (
          config.evaluation_period_param.cv_periods_between_train_test
          == config.evaluation_period_param.periods_between_train_test
      )
      assert (
          config.evaluation_period_param.cv_max_splits
          == EVALUATION_PERIOD_CV_MAX_SPLITS
      )
      assert (
          config.evaluation_metric_param.cv_selection_metric
          == EvaluationMetricEnum.MeanSquaredError.name
      )
      assert config.evaluation_metric_param.cv_report_metrics == [
          EvaluationMetricEnum.MeanAbsoluteError.name,
          EvaluationMetricEnum.MeanAbsolutePercentError.name,
      ]
      assert config.evaluation_metric_param.agg_periods is None
      assert config.evaluation_metric_param.agg_func is None
      assert config.evaluation_metric_param.null_model_params is None
      assert (
          config.evaluation_metric_param.relative_error_tolerance
          == 0.02
      )
      assert config.model_components_param.autoregression == {
          "autoreg_dict": {"autoreg_param": 0}
      }
      assert config.model_components_param.changepoints is None
      assert config.model_components_param.custom == {"custom_param": 1}
      assert config.model_components_param.growth == {"growth_param": 2}
      assert config.model_components_param.events == {"events_param": 3}
      assert config.model_components_param.hyperparameter_override == [
          {"h1": 4},
          {"h2": 5},
          None,
      ] or config.model_components_param.hyperparameter_override == [
          {"h1": 4},
          {"h2": 5},
          {},
      ]
      assert config.model_components_param.regressors == {
          "names": ["regressor1", "regressor2"]
      }
      assert config.model_components_param.lagged_regressors == {
          "lagged_regressor_dict": {"lag_reg_param": 0}
      }
      assert config.model_components_param.seasonality == {
          "seas_param": 6
      }
      assert config.model_components_param.uncertainty == {
          "uncertainty_param": 7
      }
      assert config.computation_param.hyperparameter_budget is None
      assert config.computation_param.n_jobs == COMPUTATION_N_JOBS
      assert config.computation_param.verbose == COMPUTATION_VERBOSE
      assert config.to_dict()
  
imports: import json
  from copy import deepcopy
  from typing import Optional
  import pandas
  import pytest
  from pytest import fail
  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
  from greykite.framework.templates.autogen.forecast_config import assert_equal_forecast_config
  from greykite.framework.templates.autogen.forecast_config import forecast_config_from_dict
  from greykite.framework.templates.autogen.forecast_config import from_list_dict
  from greykite.framework.templates.autogen.forecast_config import from_list_dict_or_none
  from greykite.framework.templates.autogen.forecast_config_utils import FORECAST_CONFIG_JSON_COMPLETE
  from greykite.framework.templates.autogen.forecast_config_utils import FORECAST_CONFIG_JSON_DEFAULT
  from greykite.framework.templates.forecast_config_defaults import ForecastConfigDefaults
  from greykite.framework.templates.model_templates import ModelTemplateEnum
label_desc: Use image node_id 10 for calling a global function with example usage: assert_forecast_config_json(config) without return types