code: def get_seasonality_changepoints(
      df,
      time_col,
      value_col,
      trend_changepoints_dict=None,
      trend_changepoint_dates=None,
      seasonality_changepoints_dict=None,
  ):
      """Automatically detects seasonality change points.
  
      The function first converts changepoints_dict if "method" == "auto", then extracts trend
      changepoint dates from the dictionary and feeds them into ``find_seasonality_changepoints``.
      With the detected seasonality change points, the detection result dictionary is returned.
  
      Parameters
      ----------
      df : `pandas.DataFrame`
          The data df.
      time_col : `str`
          The column name for time in ``df``.
      value_col : `str`
          The column name for value in ``df``.
      trend_changepoints_dict : `dict` or `None`, default `None`
          The ``changepoints_dict`` parameter in
          `~greykite.algo.changepoint.adalasso.changepoint_detector.get_changepoints_dict`
      trend_changepoint_dates : `list` or `None`, default `None`
          List of trend change point dates. The dates need to be parsable ty `pandas.to_datetime`.
          If given, trend change point detection will not be run and ``trend_changepoints_dict``
          will have no effect.
      seasonality_changepoints_dict : `dict` or `None`, default `None`
          The keys are the parameter names of
          `~greykite.algo.changepoint.adalasso.changepoint_detector.find_seasonality_changepoints`
          The values are the corresponding desired values.
          Note ``df``, ``time_col``, ``value_col`` and ``trend_changepoints`` are auto populated,
          and do not need to be provided.
  
      Returns
      -------
      result : `dict`
          The detected seasonality change points result dictionary as returned by
          `~greykite.algo.changepoint.adalasso.changepoint_detector.ChangepointDetector.find_seasonality_changepoints`.
      """
      if trend_changepoint_dates is None:
          # Runs trend change point detection algorithm if "method" == "auto", and returns
          # changepoints_dict with "method" == "custom";
          # Returns the original changepoints_dict if "method" == "uniform" or "custom";
          # Returns None if the original changepoints_dict is None.
          trend_changepoints_dict, _ = get_changepoints_dict(
              df=df,
              time_col=time_col,
              value_col=value_col,
              changepoints_dict=trend_changepoints_dict,
          )
          # Extracts change point dates from the changepoints_dict.
          # Returns None if the original changepoints_dict is None.
          trend_changepoint_dates = (
              get_changepoint_dates_from_changepoints_dict(
                  changepoints_dict=trend_changepoints_dict,
                  df=df,
                  time_col=time_col,
              )
          )
      # Prepares arguments for ``find_seasonality_changepoints`` function.
      seasonality_changepoint_detection_args = {
          "df": df,
          "time_col": time_col,
          "value_col": value_col,
      }
      seasonality_changepoint_detection_keys = [
          "seasonality_components_df",
          "resample_freq",
          "regularization_strength",
          "actual_changepoint_min_distance",
          "potential_changepoint_distance",
          "potential_changepoint_n",
          "no_changepoint_distance_from_end",
          "no_changepoint_proportion_from_end",
      ]
      if seasonality_changepoints_dict is not None:
          for key in seasonality_changepoint_detection_keys:
              if key in seasonality_changepoints_dict.keys():
                  seasonality_changepoint_detection_args[
                      key
                  ] = seasonality_changepoints_dict[key]
      seasonality_changepoint_detection_args[
          "trend_changepoints"
      ] = trend_changepoint_dates
      # Runs ``find_seasonality_changepoints``.
      cd = ChangepointDetector()
      result = cd.find_seasonality_changepoints(
          **seasonality_changepoint_detection_args
      )
      # Builds seasonality features with change points.
      return result
  
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 2 for calling a global function with example usage: get_seasonality_changepoints(df, time_col, value_col, trend_changepoints_dict, trend_changepoint_dates, seasonality_changepoints_dict) and returns: result