code: def test_forecast_config_json_multiple_model_components_parameter():
      """Tests ForecastConfig json with a list of model_template and model_components_param parameters"""
      json_str = """{
          "model_template": ["SILVERKITE", "SILVERKITE_DAILY_90", "SILVERKITE_WEEKLY"],
          "metadata_param": {
              "time_col": "custom_time_col",
              "anomaly_info": [{"key": "value"}, {"key2": "value2"}]
          },
          "evaluation_period_param": {
              "test_horizon": 10,
              "periods_between_train_test": 5,
              "cv_min_train_periods": 20,
              "cv_max_splits": 3
          },
          "evaluation_metric_param": {
              "cv_selection_metric": "MeanSquaredError",
              "cv_report_metrics": ["MeanAbsoluteError", "MeanAbsolutePercentError"],
              "relative_error_tolerance": 0.02
          },
          "model_components_param": [{
              "growth": {
                  "growth_param": 0
              },
              "events": {
                  "events_param": 1
              },
              "regressors": {
                  "names": ["regressor1", "regressor2"]
              },
              "seasonality": {
                  "seas_param": 2
              },
              "uncertainty": {
                  "uncertainty_param": 3
              }
          },
          {
              "autoregression": {
                  "autoreg_dict": {"autoreg_param": 0}
              },
              "custom": {
                  "custom_param": 1
              },
              "growth": {
                  "growth_param": 2
              },
              "events": {
                  "events_param": 3
              },
              "hyperparameter_override": [
                  {"h1": 4},
                  {"h2": 5},
                  {}
              ],
              "regressors": {
                  "names": ["regressor1", "regressor2"]
              },
              "lagged_regressors": {
                  "lagged_regressor_dict": {"lag_reg_param": 0}
              },
              "seasonality": {
                  "seas_param": 6
              },
              "uncertainty": {
                  "uncertainty_param": 7
              }
          }],
          "computation_param": {
              "verbose": 1
          }
      }"""
      forecast_dict = json.loads(json_str)
      config = forecast_config_from_dict(forecast_dict)
      assert_forecast_config_json_multiple_model_components_parameter(
          config
      )
  
      # Null values inside `model_template` and `model_components_param`
      json_str = """{
          "model_template": ["SILVERKITE", null, "SILVERKITE_WEEKLY"],
          "model_components_param": [null,
          {
              "autoregression": {
                  "autoreg_dict": {"autoreg_param": 0}
              },
              "custom": {
                  "custom_param": 1
              },
              "growth": {
                  "growth_param": 2
              },
              "events": {
                  "events_param": 3
              },
              "hyperparameter_override": [
                  {"h1": 4},
                  {"h2": 5},
                  {}
              ],
              "regressors": {
                  "names": ["regressor1", "regressor2"]
              },
              "lagged_regressors": {
                  "lagged_regressor_dict": {"lag_reg_param": 0}
              },
              "seasonality": {
                  "seas_param": 6
              },
              "uncertainty": {
                  "uncertainty_param": 7
              }
          }]
      }"""
      forecast_dict = json.loads(json_str)
      config2 = forecast_config_from_dict(forecast_dict)
      assert config2.model_template == [
          "SILVERKITE",
          None,
          "SILVERKITE_WEEKLY",
      ]
      assert config2.model_components_param[0] is None
      assert (
          config2.model_components_param[1:]
          == config.model_components_param[1:]
      )
  
      # Tests a string passed to `cv_report_metrics`
      json_str = """{
          "evaluation_metric_param": {
              "cv_report_metrics": "ALL"
          }
      }"""
      forecast_dict = json.loads(json_str)
      config = forecast_config_from_dict(forecast_dict)
      assert config.evaluation_metric_param.cv_report_metrics == "ALL"
      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 13 for calling a global function with example usage: test_forecast_config_json_multiple_model_components_parameter() without return types