code: def test_validate_pipeline_input():
      """Tests for validate_pipeline_input function"""
      df = pd.DataFrame(
          {
              TIME_COL: pd.date_range(
                  "2018-01-01", periods=1000, freq="D"
              ),
              VALUE_COL: np.arange(1000),
              "regressor1": np.random.normal(size=1000),
              "regressor2": np.random.normal(size=1000),
              "regressor3": np.random.normal(size=1000),
          }
      )
      hyperparameter_grid = {
          "estimator__weekly_seasonality": [True],
          "estimator__daily_seasonality": [True, False],
          "estimator__n_changepoints": [
              0
          ],  # to speed up test case, remove for better fit
          "estimator__uncertainty_samples": [
              10
          ],  # to speed up test case
          "estimator__add_regressor_dict": [
              {
                  "regressor1": {
                      "prior_scale": 10,
                      "standardize": True,
                      "mode": "additive",
                  },
                  "regressor2": {
                      "prior_scale": 15,
                      "standardize": False,
                      "mode": "additive",
                  },
                  "regressor3": {},
              }
          ],
      }
  
      # some parameters can be None
      result = mock_pipeline(
          df,
          hyperparameter_grid=None,
          coverage=None,
          relative_error_tolerance=None,
      )
      assert result["hyperparameter_grid"] is None
      assert result["coverage"] is None
      assert result["relative_error_tolerance"] is None
  
      result = mock_pipeline(
          df, hyperparameter_grid=hyperparameter_grid
      )
      assert result["hyperparameter_budget"] is None
      assert result["freq"] is None
      assert result["forecast_horizon"] == 30
      assert result["test_horizon"] == 30
      assert result["periods_between_train_test"] == 0
      assert result["cv_horizon"] == 30
      assert result["cv_use_most_recent_splits"] is False
      assert result["train_end_date"] is None
      assert result["relative_error_tolerance"] is None
      assert hyperparameter_grid == result["hyperparameter_grid"]
  
      with pytest.raises(
          ValueError, match="coverage must be between 0 and 1"
      ):
          mock_pipeline(df, coverage=-1)
  
      with pytest.raises(
          ValueError, match="relative_error_tolerance must non-negative"
      ):
          mock_pipeline(df, relative_error_tolerance=-1)
  
      with pytest.raises(
          ValueError, match="forecast_horizon must be >= 1"
      ):
          mock_pipeline(df, forecast_horizon=0)
  
      with pytest.raises(ValueError, match="test_horizon must be >= 0"):
          mock_pipeline(df, test_horizon=-1)
  
      with pytest.raises(ValueError, match="cv_horizon must be >= 0"):
          mock_pipeline(df, cv_horizon=-1)
  
      with pytest.warns(Warning) as record:
          mock_pipeline(df, forecast_horizon=501)
          assert (
              "Not enough training data to forecast the full forecast_horizon"
              in record[0].message.args[0]
          )
  
      with pytest.warns(Warning) as record:
          result = mock_pipeline(df, test_horizon=1001)
          assert result["test_horizon"] == math.floor(df.shape[0] * 0.2)
          assert (
              "test_horizon should never be larger than forecast_horizon"
              in record[0].message.args[0]
          )
  
      with pytest.warns(Warning) as record:
          mock_pipeline(df, forecast_horizon=100, test_horizon=101)
          assert (
              "test_horizon should never be larger than forecast_horizon"
              in record[0].message.args[0]
          )
  
      with pytest.warns(Warning) as record:
          mock_pipeline(df, forecast_horizon=340, test_horizon=340)
          assert (
              "test_horizon should be <= than 1/3 of the data set size"
              in record[0].message.args[0]
          )
  
      with pytest.warns(Warning) as record:
          mock_pipeline(df, forecast_horizon=340, test_horizon=0)
          assert (
              "No data selected for test" in record[0].message.args[0]
          )
  
      with pytest.warns(Warning) as record:
          mock_pipeline(
              df, forecast_horizon=340, test_horizon=0, cv_horizon=0
          )
          assert (
              "Both CV and backtest are skipped"
              in record[0].message.args[0]
          )
  
      with pytest.raises(
          ValueError, match="periods_between_train_test must be >= 0"
      ):
          mock_pipeline(df, periods_between_train_test=-1)
  
imports: import datetime
  import math
  import sys
  import warnings
  import numpy
  import pandas
  import pytest
  from scipy.stats import randint
  from sklearn.metrics import explained_variance_score
  from sklearn.metrics import mean_absolute_error
  from sklearn.metrics import mean_squared_error
  from sklearn.pipeline import Pipeline
  from greykite.common.constants import ACTUAL_COL
  from greykite.common.constants import ADJUSTMENT_DELTA_COL
  from greykite.common.constants import END_TIME_COL
  from greykite.common.constants import FRACTION_OUTSIDE_TOLERANCE
  from greykite.common.constants import METRIC_COL
  from greykite.common.constants import PREDICTED_COL
  from greykite.common.constants import QUANTILE_SUMMARY_COL
  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.constants import R2_null_model_score
  from greykite.common.evaluation import EvaluationMetricEnum
  from greykite.common.evaluation import add_finite_filter_to_scorer
  from greykite.common.evaluation import add_preaggregation_to_scorer
  from greykite.common.python_utils import assert_equal
  from greykite.common.python_utils import unique_elements_in_list
  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 CV_REPORT_METRICS_ALL
  from greykite.framework.constants import FRACTION_OUTSIDE_TOLERANCE_NAME
  from greykite.framework.input.univariate_time_series import UnivariateTimeSeries
  from greykite.framework.pipeline.pipeline import forecast_pipeline
  from greykite.framework.templates.prophet_template import ProphetTemplate
  from greykite.framework.utils.framework_testing_utils import check_forecast_pipeline_result
  from greykite.framework.utils.framework_testing_utils import mock_pipeline
  from greykite.sklearn.estimator.null_model import DummyEstimator
  from greykite.sklearn.estimator.prophet_estimator import ProphetEstimator
  from greykite.sklearn.estimator.silverkite_estimator import SilverkiteEstimator
  from greykite.sklearn.estimator.simple_silverkite_estimator import SimpleSilverkiteEstimator
  from greykite.sklearn.transform.column_selector import ColumnSelector
  from greykite.sklearn.transform.drop_degenerate_transformer import DropDegenerateTransformer
  from greykite.sklearn.transform.dtype_column_selector import DtypeColumnSelector
  from greykite.sklearn.transform.normalize_transformer import NormalizeTransformer
  from greykite.sklearn.transform.null_transformer import NullTransformer
  from greykite.sklearn.transform.pandas_feature_union import PandasFeatureUnion
  from greykite.sklearn.transform.zscore_outlier_transformer import ZscoreOutlierTransformer
label_desc: Use image node_id 4 for calling a global function with example usage: test_validate_pipeline_input() without return types