code: def test_plot_overlay_anomalies_multi_metric():
      """Tests ``plot_overlay_anomalies_multi_metric``."""
      anomaly_df = pd.DataFrame(
          {
              "start_time": [
                  "2020-01-01",
                  "2020-02-01",
                  "2020-01-02",
                  "2020-02-02",
                  "2020-02-05",
              ],
              "end_time": [
                  "2020-01-03",
                  "2020-02-04",
                  "2020-01-05",
                  "2020-02-06",
                  "2020-02-08",
              ],
              "metric": [
                  "impressions",
                  "impressions",
                  "clicks",
                  "clicks",
                  "bookings",
              ],
              "reason": ["C1", "C2", "GCN1", "GCN2", "Lockdown"],
          }
      )
  
      ts = pd.date_range(start="2019-12-01", end="2020-03-01", freq="D")
  
      np.random.seed(1317)
      df = pd.DataFrame({"ts": ts})
      size = len(df)
      value_cols = ["impressions", "clicks", "bookings"]
      df["impressions"] = np.random.normal(
          loc=0.0, scale=1.0, size=size
      )
      df["clicks"] = np.random.normal(loc=1.0, scale=1.0, size=size)
      df["bookings"] = np.random.normal(loc=2.0, scale=1.0, size=size)
  
      # Without annotation texts
      res = plot_overlay_anomalies_multi_metric(
          df=df,
          time_col="ts",
          value_cols=value_cols,
          anomaly_df=anomaly_df,
          anomaly_df_grouping_col="metric",
          start_time_col=START_TIME_COL,
          end_time_col=END_TIME_COL,
      )
  
      fig = res["fig"]
      augmented_df = res["augmented_df"]
      is_anomaly_cols = res["is_anomaly_cols"]
      line_colors = res["line_colors"]
  
      assert len(fig.data) == 6
      assert augmented_df.shape == (92, 13)
  
      assert set(is_anomaly_cols) == {
          "impressions_is_anomaly",
          "clicks_is_anomaly",
          "bookings_is_anomaly",
      }
  
      assert line_colors == [
          "rgba(31, 119, 180, 0.6)",
          "rgba(255, 127, 14, 0.6)",
          "rgba(44, 160, 44, 0.6)",
      ]
  
      # With annotation texts
      ts = pd.date_range(start="2019-12-25", end="2020-02-15", freq="D")
  
      np.random.seed(1317)
      df = pd.DataFrame({"ts": ts})
      size = len(df)
      value_cols = ["impressions", "clicks", "bookings"]
      df["impressions"] = np.random.normal(
          loc=0.0, scale=1.0, size=size
      )
      df["clicks"] = np.random.normal(loc=1.0, scale=1.0, size=size)
      df["bookings"] = np.random.normal(loc=2.0, scale=1.0, size=size)
  
      res = plot_overlay_anomalies_multi_metric(
          df=df,
          time_col="ts",
          value_cols=value_cols,
          anomaly_df=anomaly_df,
          anomaly_df_grouping_col="metric",
          start_time_col=START_TIME_COL,
          end_time_col=END_TIME_COL,
          annotation_text_col="reason",
      )
  
      fig = res["fig"]
      augmented_df = res["augmented_df"]
      is_anomaly_cols = res["is_anomaly_cols"]
      line_colors = res["line_colors"]
  
      assert len(fig.data) == 6
      assert augmented_df.shape == (53, 13)
  
      assert set(is_anomaly_cols) == {
          "impressions_is_anomaly",
          "clicks_is_anomaly",
          "bookings_is_anomaly",
      }
  
      assert line_colors == [
          "rgba(31, 119, 180, 0.6)",
          "rgba(255, 127, 14, 0.6)",
          "rgba(44, 160, 44, 0.6)",
      ]
  
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 8 for calling a global function with example usage: test_plot_overlay_anomalies_multi_metric() without return types