code: def test_get_potential_changepoint_n():
      """Tests get number of potential changepoints."""
      # Hourly data.
      n_changepoints = get_potential_changepoint_n(
          n_points=24 * 365,
          total_increment=timedelta(days=365),
          resample_freq="3D",
          yearly_seasonality_order=3,
          cap=200,
      )
      assert n_changepoints == 114
  
      # Daily data.
      n_changepoints = get_potential_changepoint_n(
          n_points=365 * 2,
          total_increment=timedelta(days=365 * 2),
          resample_freq="7D",
          yearly_seasonality_order=15,
          cap=100,
      )
      assert n_changepoints == 73
  
      # Monthly data.
      n_changepoints = get_potential_changepoint_n(
          n_points=12 * 5,
          total_increment=timedelta(days=365 * 5 + 1),
          resample_freq=None,
          yearly_seasonality_order=15,
          cap=100,
      )
      assert n_changepoints == 29
  
      # Tests cap.
      n_changepoints = get_potential_changepoint_n(
          n_points=12 * 5,
          total_increment=timedelta(days=365 * 5 + 1),
          resample_freq=None,
          yearly_seasonality_order=15,
          cap=20,
      )
      assert n_changepoints == 20
  
imports: from datetime import timedelta
  import pytest
  from greykite.algo.changepoint.adalasso.auto_changepoint_params import generate_trend_changepoint_detection_params
  from greykite.algo.changepoint.adalasso.auto_changepoint_params import get_actual_changepoint_min_distance
  from greykite.algo.changepoint.adalasso.auto_changepoint_params import get_changepoint_resample_freq
  from greykite.algo.changepoint.adalasso.auto_changepoint_params import get_no_changepoint_distance_from_end
  from greykite.algo.changepoint.adalasso.auto_changepoint_params import get_potential_changepoint_n
  from greykite.algo.changepoint.adalasso.auto_changepoint_params import get_regularization_strength
  from greykite.algo.changepoint.adalasso.auto_changepoint_params import get_yearly_seasonality_order
  from greykite.algo.changepoint.adalasso.changepoint_detector import ChangepointDetector
  from greykite.common.constants import TIME_COL
  from greykite.common.constants import VALUE_COL
  from greykite.common.testing_utils import generate_df_for_tests
label_desc: Use image node_id 7 for calling a global function with example usage: test_get_potential_changepoint_n() without return types