code: def test_run_template_2():
      """Runs custom template with all options"""
      data = generate_df_with_reg_for_tests(
          freq="D",
          periods=400,
          remove_extra_cols=True,
          mask_test_actuals=True,
      )
      reg_cols = ["regressor1", "regressor2", "regressor_categ"]
      keep_cols = [TIME_COL, VALUE_COL] + reg_cols
      df = data["df"][keep_cols]
      forecast_horizon = data["test_df"].shape[0]
  
      daily_event_df_dict = generate_holiday_events(
          countries=["UnitedStates"],
          holidays_to_model_separately=["New Year's Day"],
          year_start=2017,
          year_end=2022,
          pre_num=2,
          post_num=2,
      )
      event_pred_cols = get_event_pred_cols(daily_event_df_dict)
      model_components = ModelComponentsParam(
          seasonality={
              "fs_components_df": pd.DataFrame(
                  {
                      "name": ["tow", "tom", "toq", "toy"],
                      "period": [7.0, 1.0, 1.0, 1.0],
                      "order": [2, 1, 1, 5],
                      "seas_names": [
                          "weekly",
                          "monthly",
                          "quarterly",
                          "yearly",
                      ],
                  }
              )
          },
          events={"daily_event_df_dict": daily_event_df_dict},
          changepoints={
              "changepoints_dict": {
                  "method": "auto",
                  "yearly_seasonality_order": 3,
                  "regularization_strength": 0.5,
                  "resample_freq": "14D",
                  "potential_changepoint_distance": "56D",
                  "no_changepoint_proportion_from_end": 0.2,
              },
              "seasonality_changepoints_dict": {
                  "potential_changepoint_distance": "60D",
                  "regularization_strength": 0.5,
                  "no_changepoint_proportion_from_end": 0.2,
              },
          },
          autoregression=None,
          uncertainty={
              "uncertainty_dict": None,
          },
          custom={
              "origin_for_time_vars": None,
              "extra_pred_cols": [
                  ["ct1"] + reg_cols + event_pred_cols
              ],  # growth, regressors, events
              "fit_algorithm_dict": {
                  "fit_algorithm": "ridge",
                  "fit_algorithm_params": {"cv": 2},
              },
              "min_admissible_value": min(df[VALUE_COL])
              - abs(max(df[VALUE_COL])),
              "max_admissible_value": max(df[VALUE_COL]) * 2,
          },
      )
      config = ForecastConfig(
          model_template=ModelTemplateEnum.SK.name,
          forecast_horizon=forecast_horizon,
          coverage=0.9,
          model_components_param=model_components,
      )
  
      with warnings.catch_warnings():
          warnings.simplefilter("ignore")
          result = Forecaster().run_forecast_config(
              df=df,
              config=config,
          )
          rmse = (
              EvaluationMetricEnum.RootMeanSquaredError.get_metric_name()
          )
          q80 = EvaluationMetricEnum.Quantile80.get_metric_name()
          assert result.backtest.test_evaluation[rmse] == pytest.approx(
              2.692, rel=1e-2
          )
          assert result.backtest.test_evaluation[q80] == pytest.approx(
              1.531, rel=1e-2
          )
          assert result.backtest.test_evaluation[
              PREDICTION_BAND_COVERAGE
          ] == pytest.approx(0.835, rel=1e-2)
          assert result.forecast.train_evaluation[
              rmse
          ] == pytest.approx(2.304, rel=1e-2)
          assert result.forecast.train_evaluation[q80] == pytest.approx(
              0.921, rel=1e-2
          )
          assert result.forecast.train_evaluation[
              PREDICTION_BAND_COVERAGE
          ] == pytest.approx(0.910, rel=1e-2)
          check_forecast_pipeline_result(
              result,
              coverage=0.9,
              strategy=None,
              score_func=EvaluationMetricEnum.MeanAbsolutePercentError.name,
              greater_is_better=False,
          )
  
imports: import dataclasses
  import datetime
  import warnings
  import numpy
  import pandas
  import pytest
  from greykite.algo.forecast.silverkite.forecast_silverkite import SilverkiteForecast
  from greykite.algo.forecast.silverkite.forecast_simple_silverkite_helper import generate_holiday_events
  from greykite.algo.forecast.silverkite.forecast_simple_silverkite_helper import get_event_pred_cols
  from greykite.common.constants import ADJUSTMENT_DELTA_COL
  from greykite.common.constants import END_TIME_COL
  from greykite.common.constants import METRIC_COL
  from greykite.common.constants import PREDICTION_BAND_COVERAGE
  from greykite.common.constants import START_TIME_COL
  from greykite.common.constants import TIME_COL
  from greykite.common.constants import VALUE_COL
  from greykite.common.evaluation import EvaluationMetricEnum
  from greykite.common.python_utils import assert_equal
  from greykite.common.testing_utils import generate_df_for_tests
  from greykite.common.testing_utils import generate_df_with_reg_for_tests
  from greykite.framework.constants import COMPUTATION_N_JOBS
  from greykite.framework.constants import CV_REPORT_METRICS_ALL
  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.forecaster import Forecaster
  from greykite.framework.templates.model_templates import ModelTemplateEnum
  from greykite.framework.templates.silverkite_template import SilverkiteTemplate
  from greykite.framework.templates.silverkite_template import apply_default_model_components
  from greykite.framework.templates.silverkite_template import get_extra_pred_cols
  from greykite.framework.utils.framework_testing_utils import assert_basic_pipeline_equal
  from greykite.framework.utils.framework_testing_utils import check_forecast_pipeline_result
  from greykite.sklearn.estimator.silverkite_estimator import SilverkiteEstimator
label_desc: Use image node_id 13 for calling a global function with example usage: test_run_template_2() without return types