code: def plot_anoms(ax: plt.Axes, anomaly_labels: TimeSeries):
      """
      Plots anomalies as pink windows on the matplotlib ``Axes`` object ``ax``.
      """
      if anomaly_labels is None:
          return ax
      anomaly_labels = anomaly_labels.to_pd()
      t, y = anomaly_labels.index, anomaly_labels.values
      splits = np.where(y[1:] != y[:-1])[0] + 1
      splits = np.concatenate(([0], splits, [len(y) - 1]))
      for k in range(len(splits) - 1):
          if y[splits[k]]:  # If splits[k] is anomalous
              ax.axvspan(
                  t[splits[k]],
                  t[splits[k + 1]],
                  color="#e07070",
                  alpha=0.5,
              )
      return ax
  
imports: import logging
  from typing import Dict
  from copy import copy
  from matplotlib.colors import to_rgb
  from matplotlib.dates import AutoDateLocator, AutoDateFormatter
  import matplotlib.pyplot
  import numpy
  import pandas
  import plotly
  import plotly.graph_objects
  from plotly.subplots import make_subplots
  from merlion.utils import TimeSeries, UnivariateTimeSeries
label_desc: Use image node_id 1 for calling a global function with example usage: plot_anoms(ax, anomaly_labels) and returns: ax, ax