code: def test_quantile_regression_uncertainty_model():
      """Tests the quantile regression uncertainty model."""
      df = (
          DataLoader()
          .load_peyton_manning()
          .iloc[-365:]
          .reset_index(drop=True)
      )
      df[cst.TIME_COL] = pd.to_datetime(df[cst.TIME_COL])
  
      # Residual based
      model = SimpleSilverkiteEstimator(
          coverage=0.99,
          uncertainty_dict=dict(
              uncertainty_method="quantile_regression",
              params=dict(is_residual_based=True),
          ),
      )
      model.fit(X=df, time_col=cst.TIME_COL, value_col=cst.VALUE_COL)
      assert model.uncertainty_model is not None
      assert len(model.uncertainty_model.models) == 2
      df_fut = (
          pd.DataFrame(
              {
                  "ts": pd.date_range(
                      df["ts"].max(), freq="D", periods=15
                  ),
                  "y": np.nan,
              }
          )
          .iloc[1:]
          .reset_index(drop=True)
      )
      pred = model.predict(df_fut)
      assert cst.PREDICTED_LOWER_COL in pred.columns
      assert cst.PREDICTED_UPPER_COL in pred.columns
      assert all(
          pred[cst.PREDICTED_LOWER_COL] <= pred[cst.PREDICTED_UPPER_COL]
      )
  
      # Not residual based
      model = SimpleSilverkiteEstimator(
          coverage=0.95,
          uncertainty_dict=dict(
              uncertainty_method="quantile_regression",
              params=dict(is_residual_based=False),
          ),
      )
      model.fit(X=df, time_col=cst.TIME_COL, value_col=cst.VALUE_COL)
      assert model.uncertainty_model is not None
      assert len(model.uncertainty_model.models) == 2
      pred = model.predict(df)
      assert cst.PREDICTED_LOWER_COL in pred.columns
      assert cst.PREDICTED_UPPER_COL in pred.columns
      assert all(
          pred[cst.PREDICTED_LOWER_COL].round(5)
          <= pred[cst.PREDICTED_UPPER_COL].round(5)
      )
  
imports: import datetime
  import numpy
  import pandas
  import pytest
  from pandas.testing import assert_frame_equal
  from sklearn.linear_model import SGDRegressor
  from sklearn.metrics import mean_squared_error
  import greykite.common.constants
  from greykite.algo.forecast.silverkite.forecast_simple_silverkite import SimpleSilverkiteForecast
  from greykite.common.constants import EVENT_DF_DATE_COL
  from greykite.common.constants import EVENT_DF_LABEL_COL
  from greykite.common.data_loader import DataLoader
  from greykite.common.features.timeseries_features import convert_date_to_continuous_time
  from greykite.common.python_utils import assert_equal
  from greykite.common.testing_utils import daily_data_reg
  from greykite.common.testing_utils import generate_df_for_tests
  from greykite.common.testing_utils import generate_df_with_reg_for_tests
  from greykite.sklearn.estimator.simple_silverkite_estimator import SimpleSilverkiteEstimator
  from greykite.sklearn.estimator.testing_utils import params_component_breakdowns
label_desc: Use image node_id 19 for calling a global function with example usage: test_quantile_regression_uncertainty_model() without return types