code: def test_get_no_changepoint_distance_from_end():
      """Tests get the distance for the end where no changepoints are placed."""
      # Hourly data.
      distance = get_no_changepoint_distance_from_end(
          min_increment=timedelta(hours=1), forecast_horizon=12
      )
      assert distance == "14D"
      distance = get_no_changepoint_distance_from_end(
          min_increment=timedelta(hours=1), forecast_horizon=24 * 7
      )
      assert distance == "28D"
  
      # Daily data.
      distance = get_no_changepoint_distance_from_end(
          min_increment=timedelta(days=1), forecast_horizon=1
      )
      assert distance == "30D"
      distance = get_no_changepoint_distance_from_end(
          min_increment=timedelta(days=1), forecast_horizon=14
      )
      assert distance == "56D"
  
      # Weekly data.
      distance = get_no_changepoint_distance_from_end(
          min_increment=timedelta(days=7), forecast_horizon=2
      )
      assert distance == "56D"
      distance = get_no_changepoint_distance_from_end(
          min_increment=timedelta(days=7), forecast_horizon=4
      )
      assert distance == "112D"
  
      # Monthly data.
      distance = get_no_changepoint_distance_from_end(
          min_increment=timedelta(days=28), forecast_horizon=3
      )
      assert distance == "252D"
  
      # Yearly data.
      distance = get_no_changepoint_distance_from_end(
          min_increment=timedelta(days=365), forecast_horizon=2
      )
      assert distance == "1460D"
  
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 8 for calling a global function with example usage: test_get_no_changepoint_distance_from_end() without return types