code: def test_show_anomalies(self):
      forecasting_anomaly_model = ForecastingAnomalyModel(
          model=RegressionModel(lags=10), scorer=NormScorer()
      )
      forecasting_anomaly_model.fit(
          self.train, allow_model_training=True
      )
  
      filtering_anomaly_model = FilteringAnomalyModel(
          model=MovingAverageFilter(window=10), scorer=NormScorer()
      )
  
      for anomaly_model in [
          forecasting_anomaly_model,
          filtering_anomaly_model,
      ]:
          # must input only one series
          with pytest.raises(ValueError):
              anomaly_model.show_anomalies(
                  series=[self.train, self.train]
              )
  
          # input must be a series
          with pytest.raises(ValueError):
              anomaly_model.show_anomalies(series=[1, 2, 4])
  
          # metric must be "AUC_ROC" or "AUC_PR"
          with pytest.raises(ValueError):
              anomaly_model.show_anomalies(
                  series=self.train,
                  actual_anomalies=self.anomalies,
                  metric="str",
              )
          with pytest.raises(ValueError):
              anomaly_model.show_anomalies(
                  series=self.train,
                  actual_anomalies=self.anomalies,
                  metric="auc_roc",
              )
          with pytest.raises(ValueError):
              anomaly_model.show_anomalies(
                  series=self.train,
                  actual_anomalies=self.anomalies,
                  metric=1,
              )
  
          # actual_anomalies must be not none if metric is given
          with pytest.raises(ValueError):
              anomaly_model.show_anomalies(
                  series=self.train, metric="AUC_ROC"
              )
  
          # actual_anomalies must be binary
          with pytest.raises(ValueError):
              anomaly_model.show_anomalies(
                  series=self.train,
                  actual_anomalies=self.test,
                  metric="AUC_ROC",
              )
  
          # actual_anomalies must contain at least 1 anomaly if metric is given
          with pytest.raises(ValueError):
              anomaly_model.show_anomalies(
                  series=self.train,
                  actual_anomalies=self.only_0_anomalies,
                  metric="AUC_ROC",
              )
  
          # actual_anomalies must contain at least 1 non-anomoulous timestamp
          # if metric is given
          with pytest.raises(ValueError):
              anomaly_model.show_anomalies(
                  series=self.train,
                  actual_anomalies=self.only_1_anomalies,
                  metric="AUC_ROC",
              )
  
          # names_of_scorers must be str
          with pytest.raises(ValueError):
              anomaly_model.show_anomalies(
                  series=self.train, names_of_scorers=2
              )
          # nbr of names_of_scorers must match the nbr of scores (only 1 here)
          with pytest.raises(ValueError):
              anomaly_model.show_anomalies(
                  series=self.train,
                  names_of_scorers=["scorer1", "scorer2"],
              )
  
          # title must be str
          with pytest.raises(ValueError):
              anomaly_model.show_anomalies(series=self.train, title=1)
  
imports: from typing import Dict, Sequence, Tuple
  import numpy
  import pandas
  import pytest
  from pyod.models.knn import KNN
  from darts import TimeSeries
  from darts.ad import AndAggregator
  from darts.ad import EnsembleSklearnAggregator
  from darts.ad import OrAggregator
  from darts.ad import QuantileDetector
  from darts.ad import ThresholdDetector
  from darts.ad import CauchyNLLScorer
  from darts.ad import DifferenceScorer
  from darts.ad import ExponentialNLLScorer, FilteringAnomalyModel, ForecastingAnomalyModel, GammaNLLScorer, GaussianNLLScorer, KMeansScorer, LaplaceNLLScorer, NormScorer, PoissonNLLScorer, PyODScorer, WassersteinScorer
  from darts.ad.utils import eval_accuracy_from_scores, show_anomalies_from_scores
  from darts.models import MovingAverageFilter, NaiveSeasonal, RegressionModel
label_desc: Use image node_id 15 for calling the TestADAnomalyModel obj's underlying member method code with example usage: obj.test_show_anomalies() without return types