code: def benchmark_silverkite_template(
      data_name,
      df,
      forecast_horizons,
      fit_algorithms,
      max_cvs,
      metadata=None,
      evaluation_metric=None,
  ):
      """Benchmarks silverkite template and returns the output as a list
  
      :param data_name: str
          Name of the dataset we are performing benchmarking on
          For real datasets, the data_name matches the corresponding filename in the data/ folder
          For simulated datasets, we follow the convention "<freq>_simulated" e.g. "daily_simulated"
      :param df: pd.DataFrame
          Dataframe containing the time and value columns
      :param forecast_horizons: List[int]
          One forecast is created for every given forecast_horizon
      :param fit_algorithms: List[str]
          Names of predictive models to fit.
          Options are "linear", "lasso", "ridge", "rf" etc.
      :param max_cvs: List[int] or None
          Number of maximum CV folds to use.
      :param metadata: :class:`~greykite.framework.templates.autogen.forecast_config.MetadataParam` or None, default None
          Information about the input data. See
          :class:`~greykite.framework.templates.autogen.forecast_config.MetadataParam`.
      :param evaluation_metric: :class:`~greykite.framework.templates.autogen.forecast_config.EvaluationMetricParam` or None, default None
          What metrics to evaluate. See
          :class:`~greykite.framework.templates.autogen.forecast_config.EvaluationMetricParam`.
      :return: .csv file
          Each row of the .csv file records the following outputs from one run of the silverkite template:
  
              - "data_name": Fixed string "<freq>_simulated", or name of the dataset in data/ folder
              - "forecast_model_name": "silverkite_<fit_algorithm>" e.g. "silverkite_linear" or "prophet"
              - "train_period": train_period
              - "forecast_horizon": forecast_horizon
              - "fit_algorithm": fit algorithm name
              - "cv_folds": max_cv
              - "runtime_sec": runtime in seconds
              - "train_mae": Mean Absolute Error of training data in backtest
              - "train_mape": Mean Absolute Percent Error of training data in backtest
              - "test_mae": Mean Absolute Error of testing data in backtest
              - "test_mape": Mean Absolute Percent Error of testing data in backtest
      """
      benchmark_results = []
  
      for forecast_horizon, fit_algorithm, max_cv in itertools.product(
          forecast_horizons, fit_algorithms, max_cvs
      ):
          model_components = ModelComponentsParam(
              custom={
                  "fit_algorithm_dict": {
                      "fit_algorithm": fit_algorithm,
                  },
                  "feature_sets_enabled": True,
              }
          )
          evaluation_period = EvaluationPeriodParam(
              cv_max_splits=max_cv
          )
  
          start_time = timeit.default_timer()
          forecaster = Forecaster()
          result = forecaster.run_forecast_config(
              df=df,
              config=ForecastConfig(
                  model_template=ModelTemplateEnum.SILVERKITE.name,
                  forecast_horizon=forecast_horizon,
                  metadata_param=metadata,
                  evaluation_metric_param=evaluation_metric,
                  model_components_param=model_components,
                  evaluation_period_param=evaluation_period,
              ),
          )
          runtime = timeit.default_timer() - start_time
  
          output_dict = dict(
              data_name=data_name,
              forecast_model_name=f"silverkite_{fit_algorithm}",
              train_period=df.shape[0],
              forecast_horizon=forecast_horizon,
              cv_folds=result.grid_search.n_splits_,
              runtime_sec=round(runtime, 3),
              train_mae=result.backtest.train_evaluation["MAE"].round(
                  3
              ),
              train_mape=result.backtest.train_evaluation["MAPE"].round(
                  3
              ),
              test_mae=result.backtest.test_evaluation["MAE"].round(3),
              test_mape=result.backtest.test_evaluation["MAPE"].round(
                  3
              ),
          )
          benchmark_results.append(output_dict)
  
      return benchmark_results
  
file_path: greykite/greykite/framework/benchmark/benchmark_template.py
imports: import itertools
  import os
  import timeit
  from pathlib import Path
  from greykite.common.evaluation import EvaluationMetricEnum
  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 ModelComponentsParam
  from greykite.framework.templates.forecaster import Forecaster
  from greykite.framework.templates.model_templates import ModelTemplateEnum
label_desc: Use image node_id 1 for calling a global function with example usage: benchmark_silverkite_template(data_name, df, forecast_horizons, fit_algorithms, max_cvs, metadata, evaluation_metric) and returns: benchmark_results