code: def test_plt_annotate_series():
      """Tests ``plt_annotate_series`` function."""
      df = pd.DataFrame(
          {
              "x": list(range(10)),
              "y": [1, 2, 3, 4, 5, 4, 3, 3, 2, 1],
              "label": [
                  "cat",
                  "cat",
                  "cat",
                  "dog",
                  "dog",
                  "dog",
                  "horse",
                  "cat",
                  "cat",
                  "cat",
              ],
          }
      )
      fig = plt_annotate_series(
          df=df,
          x_col="x",
          value_col="y",
          label_col="label",
          annotate_labels=["cat", "dog"],
          keep_cols=None,
          title=None,
      )["fig"]
  
      assert fig.layout.showlegend is True
      assert fig.layout.xaxis.title.text == "x"
      assert fig.layout.yaxis.title.text == "y"
      assert len(fig.data) == 3
      assert fig.data[0].mode == "lines"
      assert fig.data[0].name == "y"
      assert fig.data[1].name == "y_label_cat"
      assert fig.data[2].name == "y_label_dog"
  
imports: import numpy
  import pandas
  import pytest
  from greykite.common.constants import END_TIME_COL
  from greykite.common.constants import START_TIME_COL
  from greykite.common.python_utils import assert_equal
  from greykite.common.viz.colors_utils import get_distinct_colors
  from greykite.common.viz.timeseries_annotate import add_multi_vrects
  from greykite.common.viz.timeseries_annotate import plot_anomalies_over_forecast_vs_actual
  from greykite.common.viz.timeseries_annotate import plot_event_periods_multi
  from greykite.common.viz.timeseries_annotate import plot_lines_markers
  from greykite.common.viz.timeseries_annotate import plot_overlay_anomalies_multi_metric
  from greykite.common.viz.timeseries_annotate import plot_precision_recall_curve
  from greykite.common.viz.timeseries_annotate import plt_annotate_series
  from greykite.common.viz.timeseries_annotate import plt_compare_series_annotations
label_desc: Use image node_id 1 for calling a global function with example usage: test_plt_annotate_series() without return types