code: def test_plot_quantiles_and_overlays():
      """Tests plot_quantiles_and_overlays"""
      dl = DataLoaderTS()
      peyton_manning_ts = dl.load_peyton_manning_ts()
      # plots one at a time, with different axis options
      fig = peyton_manning_ts.plot_quantiles_and_overlays(
          groupby_time_feature="doy", show_mean=True
      )
      assert fig.layout.showlegend
      assert fig.layout.title.text == "y vs doy"
      assert fig.layout.xaxis.title.text == "doy"
      assert fig.layout.yaxis.title.text == "y"
      assert len(fig.data) == 1
      assert fig.data[0].mode == "lines"
      assert fig.data[0].legendgroup == MEAN_COL_GROUP
      assert fig.data[0].line.color == "#595959"
      assert fig.data[0].line.width == 2
      assert fig.data[0].name == "mean"
  
      fig = peyton_manning_ts.plot_quantiles_and_overlays(
          groupby_time_feature="doy",
          show_quantiles=True,
          ylabel="log(pageviews)",
          xlabel="day of year",
      )
      assert fig.layout.showlegend
      assert fig.layout.title.text == "log(pageviews) vs day of year"
      assert fig.layout.xaxis.title.text == "day of year"
      assert fig.layout.yaxis.title.text == "log(pageviews)"
      assert len(fig.data) == 2
      assert fig.data[0].mode == "lines"
      assert fig.data[0].legendgroup == QUANTILE_COL_GROUP
      assert fig.data[0].line.color == "#1F9AFF"
      assert fig.data[0].line.width == 2
      assert fig.data[0].fill is None  # no fill from first line
      assert fig.data[1].fill == "tonexty"
      assert fig.data[0].name == "Q0.1"
      assert fig.data[1].name == "Q0.9"
  
      fig = peyton_manning_ts.plot_quantiles_and_overlays(
          groupby_time_feature="doy",
          show_overlays=True,
          overlay_label_time_feature="year",
          ylabel="log(pageviews)",
          xlabel="day of year",
          title="Yearly seasonality patterns",
          showlegend=False,
      )
      assert not fig.layout.showlegend
      assert fig.layout.title.text == "Yearly seasonality patterns"
      assert fig.layout.xaxis.title.text == "day of year"
      assert fig.layout.yaxis.title.text == "log(pageviews)"
      assert len(fig.data) == 10
      assert fig.data[0].mode == "lines"
      assert fig.data[0].legendgroup == OVERLAY_COL_GROUP
      assert fig.data[0].line.color == "#B3B3B3"
      assert fig.data[0].line.width == 1
      assert fig.data[0].line.dash == "solid"
      assert fig.data[0].name == "2007"
      assert fig.data[-1].name == "2016"
  
      # plots all at once
      fig = peyton_manning_ts.plot_quantiles_and_overlays(
          groupby_time_feature="doy",
          show_mean=True,
          show_quantiles=True,
          show_overlays=True,
          overlay_label_time_feature="year",
          ylabel="log(pageviews)",
          xlabel="day of year",
          title="Yearly seasonality patterns",
          showlegend=True,
      )
      assert fig.layout.showlegend
      assert fig.layout.title.text == "Yearly seasonality patterns"
      assert fig.layout.xaxis.title.text == "day of year"
      assert fig.layout.yaxis.title.text == "log(pageviews)"
      assert (
          len(fig.data) == 13
      )  # 1 (mean) + 2 (quantiles) + 10 (one per year)
      assert fig.data[0].mode == "lines"
      assert fig.data[0].legendgroup == OVERLAY_COL_GROUP
      assert fig.data[0].line.color == "#B3B3B3"
      assert fig.data[0].line.width == 1
      assert fig.data[0].line.dash == "solid"
      assert fig.data[0].opacity == 0.5
      assert fig.data[0].name == "2007"
      assert fig.data[9].name == "2016"
      assert fig.data[10].name == "Q0.1"
      assert fig.data[11].name == "Q0.9"
      assert fig.data[12].name == "mean"
  
      # plots all with custom style
      beijing_pm_ts = dl.load_beijing_pm_ts()
      mean_style = {
          "line": dict(width=2, color="#757575"),  # gray
          "legendgroup": MEAN_COL_GROUP,
      }
      quantile_style = {
          "line": dict(width=2, color="#A3A3A3"),  # light gray
          "legendgroup": QUANTILE_COL_GROUP,
          "fill": "tonexty",
      }
      overlay_style = {  # Different color for each line (unspecified)
          "line": dict(  # No legendgroup to allow individual toggling of lines.
              width=1, dash="dot"
          )
      }
      fig = beijing_pm_ts.plot_quantiles_and_overlays(
          groupby_time_feature="hour",
          show_mean=True,
          show_quantiles=[0.2, 0.8],
          show_overlays=True,
          overlay_label_time_feature="month",
          center_values=True,
          mean_col_name="avg",
          mean_style=mean_style,
          quantile_style=quantile_style,
          overlay_style=overlay_style,
          xlabel="hour of day",
          value_col="pres",
          title="Daily seasonality pattern: pres",
      )
      assert fig.layout.showlegend
      assert fig.layout.title.text == "Daily seasonality pattern: pres"
      assert fig.layout.xaxis.title.text == "hour of day"
      assert fig.layout.yaxis.title.text == "pres"
      assert len(fig.data) == 15
      # The first timeseries is the 12 overlays (one per month), then Q0.1, Q0.9, then the mean
      assert fig.data[0].name == "1"
      assert fig.data[11].name == "12"
      assert fig.data[12].name == "Q0.2"
      assert fig.data[13].name == "Q0.8"
      assert fig.data[14].name == "avg"
      assert fig.data[0].mode == "lines"
      assert fig.data[0].legendgroup is None
      assert fig.data[0].line.color is None
      assert fig.data[12].line.color == "#A3A3A3"
      assert fig.data[14].line.color == "#757575"
  
imports: import datetime
  from datetime import datetime
  import numpy
  import pandas
  import pytest
  from pandas.testing import assert_frame_equal
  from greykite.common.constants import ADJUSTMENT_DELTA_COL
  from greykite.common.constants import END_TIME_COL
  from greykite.common.constants import METRIC_COL
  from greykite.common.constants import START_TIME_COL
  from greykite.common.constants import TIME_COL
  from greykite.common.constants import VALUE_COL
  from greykite.common.python_utils import assert_equal
  from greykite.common.testing_utils import generate_df_for_tests
  from greykite.common.testing_utils import generate_df_with_reg_for_tests
  from greykite.common.time_properties import get_canonical_data
  from greykite.common.viz.timeseries_plotting import add_groupby_column
  from greykite.framework.benchmark.data_loader_ts import DataLoaderTS
  from greykite.framework.constants import MEAN_COL_GROUP
  from greykite.framework.constants import OVERLAY_COL_GROUP
  from greykite.framework.constants import QUANTILE_COL_GROUP
  from greykite.framework.input.univariate_time_series import UnivariateTimeSeries
label_desc: Use image node_id 15 for calling a global function with example usage: test_plot_quantiles_and_overlays() without return types