class_docstr: A class to implement change point detection.
  
  Currently supports long-term change point detection only. Input is a dataframe with time_col
  indicating the column of time info (the format should be able to be parsed by pd.to_datetime),
  and value_col indicating the column of observed time series values.
  
  Attributes
  ----------
  original_df : `pandas.DataFrame`
      The original data df, used to retrieve original observations, if aggregation is used in
      fitting change points.
  time_col : `str`
      The column name for time column.
  value_col : `str`
      The column name for value column.
  trend_potential_changepoint_n: `int`
      The number of change points that are evenly distributed over the time period.
  yearly_seasonality_order : `int`
      The yearly seasonality order used when fitting trend.
  y : `pandas.Series`
      The observations after aggregation.
  trend_df : `pandas.DataFrame`
      The augmented df of the original_df, including regressors of trend change points and
      Fourier series for yearly seasonality.
  trend_model : `sklearn.base.RegressionMixin`
      The fitted trend model.
  trend_coef : `numpy.array`
      The estimated trend coefficients.
  trend_intercept : `float`
      The estimated trend intercept.
  adaptive_lasso_coef : `list`
      The list of length two, first element is estimated trend coefficients, and second element
      is intercept, both estimated by adaptive lasso.
  trend_changepoints : `list`
      The list of detected trend change points, parsable by pd.to_datetime
  trend_estimation : `pd.Series`
      The estimated trend with detected trend change points.
  seasonality_df : `pandas.DataFrame`
      The augmented df of ``original_df``, including regressors of seasonality change points with
      different Fourier series frequencies.
  seasonality_changepoints : `dict`
      The dictionary of detected seasonality change points for each component.
      Keys are component names, and values are list of change points.
  seasonality_estimation : `pandas.Series`
      The estimated seasonality with detected seasonality change points.
      The series has the same length as ``original_df``. Index is timestamp, and values
      are the estimated seasonality at each timestamp.
      The seasonality estimation is the estimated of seasonality effect with trend estimated
      by `~greykite.algo.changepoint.adalasso.changepoints_utils.estimate_trend_with_detected_changepoints`
      removed.
  
  Methods
  -------
  find_trend_changepoints : callable
      Finds the potential trend change points for a given time series df.
  plot : callable
      Plot the results after implementing find_trend_changepoints.
code: def __init__(self):
      self.original_df: Optional[pd.DataFrame] = None
      self.time_col: Optional[str] = None
      self.value_col: Optional[str] = None
      self.trend_potential_changepoint_n: Optional[int] = None
      self.yearly_seasonality_order: Optional[int] = None
      self.y: Optional[pd.Series, pd.DataFrame] = None
      self.trend_df: Optional[pd.Series, pd.DataFrame] = None
      self.trend_model: Optional[RegressorMixin] = None
      self.trend_coef: Optional[np.ndarray] = None
      self.trend_intercept: Optional[float] = None
      self.adaptive_lasso_coef: Optional[List] = None
      self.trend_changepoints: Optional[List] = None
      self.trend_estimation: Optional[pd.Series] = None
      self.seasonality_df: Optional[pd.DataFrame] = None
      self.seasonality_changepoints: Optional[dict] = None
      self.seasonality_estimation: Optional[pd.Series] = None
      self.shift_detector: Optional[ShiftDetection] = None
      self.level_shift_df: Optional[pd.DataFrame] = None
  
imports: import warnings
  from datetime import timedelta
  from typing import List
  from typing import Optional
  import numpy
  import pandas
  from pandas.tseries.frequencies import to_offset
  from sklearn.base import RegressorMixin
  from sklearn.exceptions import ConvergenceWarning
  from sklearn.linear_model import LassoCV
  from sklearn.linear_model import LinearRegression
  from sklearn.linear_model import RidgeCV
  from greykite.algo.changepoint.adalasso.changepoints_utils import build_seasonality_feature_df_with_changes
  from greykite.algo.changepoint.adalasso.changepoints_utils import build_trend_feature_df_with_changes
  from greykite.algo.changepoint.adalasso.changepoints_utils import check_freq_unit_at_most_day
  from greykite.algo.changepoint.adalasso.changepoints_utils import combine_detected_and_custom_trend_changepoints
  from greykite.algo.changepoint.adalasso.changepoints_utils import compute_fitted_components
  from greykite.algo.changepoint.adalasso.changepoints_utils import compute_min_changepoint_index_distance
  from greykite.algo.changepoint.adalasso.changepoints_utils import estimate_seasonality_with_detected_changepoints
  from greykite.algo.changepoint.adalasso.changepoints_utils import estimate_trend_with_detected_changepoints
  from greykite.algo.changepoint.adalasso.changepoints_utils import get_changepoint_dates_from_changepoints_dict
  from greykite.algo.changepoint.adalasso.changepoints_utils import get_seasonality_changes_from_adaptive_lasso
  from greykite.algo.changepoint.adalasso.changepoints_utils import get_trend_changes_from_adaptive_lasso
  from greykite.algo.changepoint.adalasso.changepoints_utils import get_yearly_seasonality_changepoint_dates_from_freq
  from greykite.algo.changepoint.adalasso.changepoints_utils import plot_change
  from greykite.algo.changepoint.shift_detection.shift_detector import ShiftDetection
  from greykite.common.constants import TimeFeaturesEnum
  from greykite.common.features.timeseries_features import get_evenly_spaced_changepoints_dates
  from greykite.common.logging import LoggingLevelEnum
  from greykite.common.logging import log_message
  from greykite.common.logging import pprint
  from greykite.common.python_utils import ignore_warnings
label_desc: Use image node_id 1 to create a new ChangepointDetector object  with example: obj = ChangepointDetector()