code: def test_plot():
      """Checks plot function"""
      # Plots with `color`
      ts = UnivariateTimeSeries()
      df = pd.DataFrame(
          {
              TIME_COL: [
                  dt(2018, 1, 1, 3, 0, 0),
                  dt(2018, 1, 1, 4, 0, 0),
                  dt(2018, 1, 1, 5, 0, 0),
              ],
              VALUE_COL: [1, 2, 3],
          }
      )
      ts.load_data(df, TIME_COL, VALUE_COL)
      fig = ts.plot(color="green")
      assert len(fig.data) == 1
      assert fig.data[0].line.color == "green"
      with pytest.raises(
          ValueError,
          match="There is no `anomaly_info` to show. `show_anomaly_adjustment` must be False.",
      ):
          ts.plot(show_anomaly_adjustment=True)
  
      # Plots with `show_anomaly_adjustment`
      dl = DataLoaderTS()
      df = dl.load_beijing_pm()
      value_col = "pm"
      # Masks up to 2011-02-04-03, and adds 100.0 to the rest
      anomaly_df = pd.DataFrame(
          {
              START_TIME_COL: ["2010-01-01-00", "2011-02-04-03"],
              END_TIME_COL: ["2011-02-04-03", "2014-12-31-23"],
              ADJUSTMENT_DELTA_COL: [np.nan, 100.0],
              METRIC_COL: [value_col, value_col],
          }
      )
      anomaly_info = {
          "value_col": value_col,
          "anomaly_df": anomaly_df,
          "start_time_col": START_TIME_COL,
          "end_time_col": END_TIME_COL,
          "adjustment_delta_col": ADJUSTMENT_DELTA_COL,
          "filter_by_dict": {METRIC_COL: value_col},
          "adjustment_method": "add",
      }
      ts = UnivariateTimeSeries()
      ts.load_data(df=df, value_col="pm", anomaly_info=anomaly_info)
      fig = ts.plot(show_anomaly_adjustment=True)
      assert len(fig.data) == 2
      assert fig.data[0].name == value_col
      assert fig.data[1].name == f"{value_col}_unadjusted"
      assert fig.layout.xaxis.title.text == ts.original_time_col
      assert fig.layout.yaxis.title.text == ts.original_value_col
      assert fig.data[0].y.shape[0] == df.shape[0]
      assert fig.data[1].y.shape[0] == df.shape[0]
      # adjusted data has more NaNs, since anomalies are replaced with NaN
      assert sum(np.isnan(fig.data[0].y)) == 10906
      assert sum(np.isnan(fig.data[1].y)) == 2067
  
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 11 for calling a global function with example usage: test_plot() without return types