code: def test_get_yearly_seasonality_changepoint_dates_from_freq():
      df = pd.DataFrame(
          {
              "ts": pd.date_range(
                  start="2020-01-01", end="2025-01-01", freq="D"
              )
          }
      )
      # tests None
      result = get_yearly_seasonality_changepoint_dates_from_freq(
          df=df, time_col="ts", yearly_seasonality_change_freq=None
      )
      assert result == []
      # tests regular input
      result = get_yearly_seasonality_changepoint_dates_from_freq(
          df=df, time_col="ts", yearly_seasonality_change_freq="365D"
      )
      assert result == list(
          pd.to_datetime(
              ["2020-12-31", "2021-12-31", "2022-12-31", "2023-12-31"]
          )
      )
      # tests least_training_length
      result = get_yearly_seasonality_changepoint_dates_from_freq(
          df=df,
          time_col="ts",
          yearly_seasonality_change_freq="365D",
          min_training_length="400D",
      )
      assert result == list(
          pd.to_datetime(["2020-12-31", "2021-12-31", "2022-12-31"])
      )
      # tests warnings
      with pytest.warns(UserWarning) as record:
          get_yearly_seasonality_changepoint_dates_from_freq(
              df=df,
              time_col="ts",
              yearly_seasonality_change_freq="180D",
          )
          assert (
              "yearly_seasonality_change_freq is less than a year. It might be too short "
              "to fit accurate yearly seasonality."
              in record[0].message.args[0]
          )
      with pytest.warns(UserWarning) as record:
          get_yearly_seasonality_changepoint_dates_from_freq(
              df=df,
              time_col="ts",
              yearly_seasonality_change_freq="10000D",
          )
          assert (
              "No yearly seasonality changepoint added. Either data length is too short "
              "or yearly_seasonality_change_freq is too long."
              in record[0].message.args[0]
          )
  
imports: from datetime import datetime
  import numpy
  import pandas
  import pytest
  from greykite.algo.changepoint.adalasso.changepoints_utils import adaptive_lasso_cv
  from greykite.algo.changepoint.adalasso.changepoints_utils import build_seasonality_feature_df_from_detection_result
  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 filter_changepoints
  from greykite.algo.changepoint.adalasso.changepoints_utils import find_neighbor_changepoints
  from greykite.algo.changepoint.adalasso.changepoints_utils import get_changes_from_beta
  from greykite.algo.changepoint.adalasso.changepoints_utils import get_seasonality_changepoint_df_cols
  from greykite.algo.changepoint.adalasso.changepoints_utils import get_seasonality_changes_from_adaptive_lasso
  from greykite.algo.changepoint.adalasso.changepoints_utils import get_trend_changepoint_dates_from_cols
  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.common.testing_utils import generate_df_for_tests
label_desc: Use image node_id 19 for calling a global function with example usage: test_get_yearly_seasonality_changepoint_dates_from_freq() without return types