code: def test_get_silverkite_uncertainty_dict_exception():
      """Testing silverkite_uncertainty_dict.
      Exception must be raised if `quantiles` and `coverage` are not consistent.
      """
  
      # note  param `quantiles = [0.02, 0.98]` will translate to coverage = 0.96
      # as opposed to the coverage specified below (0.95)
      uncertainty_dict = {
          "uncertainty_method": "simple_conditional_residuals",
          "params": {
              "conditional_cols": ["dow_hr"],
              "quantiles": [0.02, 0.98],
              "quantile_estimation_method": "normal_fit",
              "sample_size_thresh": 5,
              "small_sample_size_method": "std_quantiles",
              "small_sample_size_quantile": 0.98,
          },
      }
  
      expected_match_str = (
          "Coverage is specified/inferred both via `coverage`"
          " and via `uncertainty` input and values do not match."
          " Coverage specified via `coverage`: 0.95."
          " Coverage inferred via `uncertainty`: 0.96."
      )
  
      with pytest.raises(ValueError, match=expected_match_str):
          get_silverkite_uncertainty_dict(
              uncertainty=uncertainty_dict, coverage=0.95
          )
  
      # exception for quantiles not being an increasing sequence
      quantiles = [0.975, 0.025]
      uncertainty_dict = {
          "uncertainty_method": "simple_conditional_residuals",
          "params": {
              "conditional_cols": ["dow_hr"],
              "quantiles": quantiles,
              "quantile_estimation_method": "normal_fit",
              "sample_size_thresh": 5,
              "small_sample_size_method": "std_quantiles",
              "small_sample_size_quantile": 0.98,
          },
      }
  
      expected_match_str = (
          "`quantiles` is expected to be an increasing sequence"
          " of at least two elements."
      )
  
      with pytest.raises(ValueError, match=expected_match_str):
          get_silverkite_uncertainty_dict(
              uncertainty=uncertainty_dict, coverage=0.95
          )
  
      # exception check when quantiles are not available in `uncertainty`
      # and coverage is also None
      quantiles = None
      uncertainty_dict = {
          "uncertainty_method": "simple_conditional_residuals",
          "params": {
              "conditional_cols": ["dow_hr"],
              "quantiles": quantiles,
              "quantile_estimation_method": "normal_fit",
              "sample_size_thresh": 5,
              "small_sample_size_method": "std_quantiles",
              "small_sample_size_quantile": 0.98,
          },
      }
  
      expected_match_str = (
          "`quantiles` are not specified in `uncertainty`"
          " and `coverage` is not provided to infer them"
      )
  
      with pytest.raises(ValueError, match=expected_match_str):
          get_silverkite_uncertainty_dict(
              uncertainty=uncertainty_dict, coverage=None
          )
  
file_path: greykite/greykite/tests/algo/forecast/silverkite/test_forecast_silverkite_helper.py
imports: import datetime
  import pandas
  import pytest
  from greykite.algo.forecast.silverkite.forecast_silverkite_helper import get_default_changepoints_dict
  from greykite.algo.forecast.silverkite.forecast_silverkite_helper import get_fourier_feature_col_names
  from greykite.algo.forecast.silverkite.forecast_silverkite_helper import get_silverkite_uncertainty_dict
  from greykite.algo.forecast.silverkite.forecast_silverkite_helper import get_similar_lag
  from greykite.common.features.timeseries_features import fourier_series_multi_fcn
  from greykite.common.python_utils import assert_equal
  from greykite.common.testing_utils import generate_df_for_tests
label_desc: Use image node_id 3 for calling a global function with example usage: test_get_silverkite_uncertainty_dict_exception() without return types