code: def test_prophet_template_custom():
      """Tests prophet_template with custom values, with long range input"""
      # prepares input data
      data = generate_df_with_reg_for_tests(
          freq="H",
          periods=300 * 24,
          remove_extra_cols=True,
          mask_test_actuals=True,
      )
      df = data["df"]
      time_col = "some_time_col"
      value_col = "some_value_col"
      df.rename(
          {cst.TIME_COL: time_col, cst.VALUE_COL: value_col},
          axis=1,
          inplace=True,
      )
      # prepares params and calls template
      metric = EvaluationMetricEnum.MeanAbsoluteError
      # anomaly adjustment adds 10.0 to every record
      adjustment_size = 10.0
      anomaly_df = pd.DataFrame(
          {
              cst.START_TIME_COL: [df[time_col].min()],
              cst.END_TIME_COL: [df[time_col].max()],
              cst.ADJUSTMENT_DELTA_COL: [adjustment_size],
              cst.METRIC_COL: [value_col],
          }
      )
      anomaly_info = {
          "value_col": cst.VALUE_COL,
          "anomaly_df": anomaly_df,
          "start_time_col": cst.START_TIME_COL,
          "end_time_col": cst.END_TIME_COL,
          "adjustment_delta_col": cst.ADJUSTMENT_DELTA_COL,
          "filter_by_dict": {cst.METRIC_COL: cst.VALUE_COL},
          "adjustment_method": "add",
      }
      metadata = MetadataParam(
          time_col=time_col,
          value_col=value_col,
          freq="H",
          date_format="%Y-%m-%d-%H",
          train_end_date=datetime.datetime(2019, 7, 1),
          anomaly_info=anomaly_info,
      )
      evaluation_metric = EvaluationMetricParam(
          cv_selection_metric=metric.name,
          cv_report_metrics=[
              EvaluationMetricEnum.MedianAbsolutePercentError.name
          ],
          agg_periods=24,
          agg_func=np.max,
          null_model_params={
              "strategy": "quantile",
              "constant": None,
              "quantile": 0.8,
          },
          relative_error_tolerance=0.01,
      )
      evaluation_period = EvaluationPeriodParam(
          test_horizon=1,
          periods_between_train_test=2,
          cv_horizon=3,
          cv_min_train_periods=4,
          cv_expanding_window=True,
          cv_use_most_recent_splits=True,
          cv_periods_between_splits=5,
          cv_periods_between_train_test=6,
          cv_max_splits=7,
      )
      model_components = ModelComponentsParam(
          seasonality={
              "yearly_seasonality": [True],
              "weekly_seasonality": [False],
              "daily_seasonality": [4],
              "add_seasonality_dict": [
                  {
                      "yearly": {
                          "period": 365.25,
                          "fourier_order": 20,
                          "prior_scale": 20.0,
                      },
                      "quarterly": {
                          "period": 365.25 / 4,
                          "fourier_order": 15,
                      },
                      "weekly": {
                          "period": 7,
                          "fourier_order": 35,
                          "prior_scale": 30.0,
                      },
                  }
              ],
          },
          growth={"growth_term": "linear"},
          events={
              "holiday_lookup_countries": [
                  "UnitedStates",
                  "UnitedKingdom",
                  "India",
              ],
              "holiday_pre_num_days": [2],
              "holiday_post_num_days": [3],
              "holidays_prior_scale": [5.0],
          },
          regressors={
              "add_regressor_dict": [
                  {
                      "regressor1": {
                          "prior_scale": 10.0,
                          "mode": "additive",
                      },
                      "regressor2": {
                          "prior_scale": 20.0,
                          "mode": "multiplicative",
                      },
                  }
              ]
          },
          changepoints={
              "changepoint_prior_scale": [0.05],
              "changepoints": [None],
              "n_changepoints": [50],
              "changepoint_range": [0.9],
          },
          uncertainty={
              "mcmc_samples": [500],
              "uncertainty_samples": [2000],
          },
          hyperparameter_override={
              "input__response__null__impute_algorithm": "ts_interpolate",
              "input__response__null__impute_params": {
                  "orders": [7, 14]
              },
              "input__regressors_numeric__normalize__normalize_algorithm": "RobustScaler",
          },
      )
      computation = ComputationParam(
          hyperparameter_budget=10, n_jobs=None, verbose=1
      )
      forecast_horizon = 20
      coverage = 0.7
      config = ForecastConfig(
          model_template=ModelTemplateEnum.PROPHET.name,
          metadata_param=metadata,
          forecast_horizon=forecast_horizon,
          coverage=coverage,
          evaluation_metric_param=evaluation_metric,
          evaluation_period_param=evaluation_period,
          model_components_param=model_components,
          computation_param=computation,
      )
      template = ProphetTemplate()
      params = template.apply_template_for_pipeline_params(
          df=df, config=config
      )
      pipeline = params.pop("pipeline", None)
      # Adding start_year and end_year based on the input df
      model_components.events["start_year"] = df[time_col].min().year
      model_components.events["end_year"] = df[time_col].max().year
      expected_params = dict(
          df=df,
          time_col=time_col,
          value_col=value_col,
          date_format=metadata.date_format,
          freq=metadata.freq,
          train_end_date=metadata.train_end_date,
          anomaly_info=metadata.anomaly_info,
          # model
          regressor_cols=template.regressor_cols,
          lagged_regressor_cols=template.lagged_regressor_cols,
          estimator=None,
          hyperparameter_grid=template.hyperparameter_grid,
          hyperparameter_budget=computation.hyperparameter_budget,
          n_jobs=computation.n_jobs,
          verbose=computation.verbose,
          # forecast
          forecast_horizon=forecast_horizon,
          coverage=coverage,
          test_horizon=evaluation_period.test_horizon,
          periods_between_train_test=evaluation_period.periods_between_train_test,
          agg_periods=evaluation_metric.agg_periods,
          agg_func=evaluation_metric.agg_func,
          # evaluation
          score_func=metric.name,
          score_func_greater_is_better=metric.get_metric_greater_is_better(),
          cv_report_metrics=evaluation_metric.cv_report_metrics,
          null_model_params=evaluation_metric.null_model_params,
          relative_error_tolerance=evaluation_metric.relative_error_tolerance,
          # CV
          cv_horizon=evaluation_period.cv_horizon,
          cv_min_train_periods=evaluation_period.cv_min_train_periods,
          cv_expanding_window=evaluation_period.cv_expanding_window,
          cv_use_most_recent_splits=evaluation_period.cv_use_most_recent_splits,
          cv_periods_between_splits=evaluation_period.cv_periods_between_splits,
          cv_periods_between_train_test=evaluation_period.cv_periods_between_train_test,
          cv_max_splits=evaluation_period.cv_max_splits,
      )
      assert_basic_pipeline_equal(pipeline, template.pipeline)
      assert_equal(params, expected_params)
  
imports: import datetime
  import sys
  import warnings
  import numpy
  import pandas
  import pytest
  from pandas.testing import assert_frame_equal
  import greykite.common.constants
  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.prophet_template import ProphetTemplate
  from greykite.framework.utils.framework_testing_utils import assert_basic_pipeline_equal
  from greykite.sklearn.estimator.prophet_estimator import ProphetEstimator
label_desc: Use image node_id 16 for calling a global function with example usage: test_prophet_template_custom() without return types