code: def get_evenly_spaced_changepoints_dates(
      df, time_col, n_changepoints
  ):
      """Partitions interval into n_changepoints + 1 segments,
          placing a changepoint at left endpoint of each segment.
          The left most segment doesn't get a changepoint.
          Changepoints should be determined from training data.
  
      :param df: pd.DataFrame
          training dataset. contains continuous_time_col
      :param time_col: str
          name of time column
      :param n_changepoints: int
          number of changepoints requested
      :return: pd.Series
          values of df[time_col] at the changepoints
      """
      if not n_changepoints >= 0:
          raise ValueError("n_changepoints must be >= 0")
      changepoint_indices = np.floor(
          np.arange(start=1, stop=n_changepoints + 1)
          * (df.shape[0] / (n_changepoints + 1))
      )
      changepoint_indices = df.index[
          np.concatenate([[0], changepoint_indices.astype(int)])
      ]
      return df.loc[changepoint_indices, time_col]
  
imports: import math
  from datetime import datetime
  from datetime import timedelta
  import numpy
  import pandas
  import pytz
  from holidays_ext import get_holidays
  from pandas.tseries.frequencies import to_offset
  from scipy.special import expit
  from greykite.common import constants
  from greykite.common.python_utils import split_offset_str
label_desc: Use image node_id 18 for calling a global function with example usage: get_evenly_spaced_changepoints_dates(df, time_col, n_changepoints) and returns: df