code: def test_forecast_simple_silverkite_changepoints():
      dl = DataLoader()
      df = dl.load_peyton_manning()
      silverkite = SimpleSilverkiteForecast()
      trained_model = silverkite.forecast_simple(
          df=df,
          time_col="ts",
          value_col="y",
          changepoints_dict={
              "method": "auto",
              "yearly_seasonality_order": 6,
              "resample_freq": "2D",
              "actual_changepoint_min_distance": "100D",
              "potential_changepoint_distance": "50D",
              "no_changepoint_proportion_from_end": 0.3,
          },
      )
      changepoint_values = trained_model["changepoint_values"]
      df_length = trained_model["x_mat"]["ct1"].iloc[-1]
      cp_distance = timedelta(days=100) / (
          pd.to_datetime(df["ts"].iloc[-1])
          - pd.to_datetime(df["ts"].iloc[0])
      )
      # has change points
      assert len(changepoint_values) >= 0
      # checks no change points at the end
      assert changepoint_values[-1] <= df_length * 0.7
      # checks change point distance is at least "100D"
      min_cp_dist = min(
          [
              changepoint_values[i] - changepoint_values[i - 1]
              for i in range(1, len(changepoint_values))
          ]
      )
      assert min_cp_dist >= df_length * cp_distance
      # checks the ChangepointDetector class is passed to forecast_silverkite
      assert (
          trained_model["changepoint_detector"].trend_changepoints
          is not None
      )
      # checks the number of change points is consistent with the change points detected by ChangepointDetector
      cd = ChangepointDetector()
      res = cd.find_trend_changepoints(
          df=df,
          time_col="ts",
          value_col="y",
          yearly_seasonality_order=6,
          resample_freq="2D",
          actual_changepoint_min_distance="100D",
          potential_changepoint_distance="50D",
          no_changepoint_proportion_from_end=0.3,
      )
      changepoint_dates = res["trend_changepoints"]
      assert len(changepoint_values) == len(changepoint_dates)
      # test ``changepoints_dict`` is None
      trained_model = silverkite.forecast_simple(
          df=df, time_col="ts", value_col="y", changepoints_dict=None
      )
      changepoint_values = trained_model["changepoint_values"]
      assert changepoint_values is None
  
imports: import datetime
  import math
  import sys
  import warnings
  from datetime import timedelta
  import pandas
  import pytest
  from testfixtures import LogCapture
  import greykite.common.constants
  from greykite.algo.changepoint.adalasso.changepoint_detector import ChangepointDetector
  from greykite.algo.forecast.silverkite.constants.silverkite_column import SilverkiteColumn
  from greykite.algo.forecast.silverkite.constants.silverkite_holiday import SilverkiteHoliday
  from greykite.algo.forecast.silverkite.constants.silverkite_seasonality import SilverkiteSeasonality
  from greykite.algo.forecast.silverkite.constants.silverkite_seasonality import SilverkiteSeasonalityEnum
  from greykite.algo.forecast.silverkite.forecast_simple_silverkite import SimpleSilverkiteForecast
  from greykite.algo.forecast.silverkite.forecast_simple_silverkite_helper import generate_holiday_events
  from greykite.common.constants import CHANGEPOINT_COL_PREFIX
  from greykite.common.constants import EVENT_DF_DATE_COL
  from greykite.common.constants import EVENT_DF_LABEL_COL
  from greykite.common.constants import LOGGER_NAME
  from greykite.common.constants import TIME_COL
  from greykite.common.constants import VALUE_COL
  from greykite.common.data_loader import DataLoader
  from greykite.common.enums import SimpleTimeFrequencyEnum
  from greykite.common.enums import TimeEnum
  from greykite.common.features.timeseries_features import get_available_holidays_across_countries
  from greykite.common.features.timeseries_features import get_holidays
  from greykite.common.python_utils import assert_equal
  from greykite.common.python_utils import update_dictionary
  from greykite.common.testing_utils import generate_df_for_tests
  from greykite.common.testing_utils import generate_df_with_reg_for_tests
label_desc: Use image node_id 11 for calling a global function with example usage: test_forecast_simple_silverkite_changepoints() without return types