code: def test_show_anomalies_from_scores(self):
      # must input only one series
      with pytest.raises(ValueError):
          show_anomalies_from_scores(series=[self.train, self.train])
  
      # input must be a series
      with pytest.raises(ValueError):
          show_anomalies_from_scores(series=[1, 2, 4])
  
      # must input only one model_output
      with pytest.raises(ValueError):
          show_anomalies_from_scores(
              series=self.train, model_output=[self.test, self.train]
          )
  
      # metric must be "AUC_ROC" or "AUC_PR"
      with pytest.raises(ValueError):
          show_anomalies_from_scores(
              series=self.train,
              anomaly_scores=self.test,
              actual_anomalies=self.anomalies,
              metric="str",
          )
      with pytest.raises(ValueError):
          show_anomalies_from_scores(
              series=self.train,
              anomaly_scores=self.test,
              actual_anomalies=self.anomalies,
              metric="auc_roc",
          )
      with pytest.raises(ValueError):
          show_anomalies_from_scores(
              series=self.train,
              anomaly_scores=self.test,
              actual_anomalies=self.anomalies,
              metric=1,
          )
  
      # actual_anomalies must be not none if metric is given
      with pytest.raises(ValueError):
          show_anomalies_from_scores(
              series=self.train,
              anomaly_scores=self.test,
              metric="AUC_ROC",
          )
  
      # actual_anomalies must be binary
      with pytest.raises(ValueError):
          show_anomalies_from_scores(
              series=self.train,
              anomaly_scores=self.test,
              actual_anomalies=self.test,
              metric="AUC_ROC",
          )
  
      # actual_anomalies must contain at least 1 anomaly if metric is given
      with pytest.raises(ValueError):
          show_anomalies_from_scores(
              series=self.train,
              anomaly_scores=self.test,
              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):
          show_anomalies_from_scores(
              series=self.train,
              anomaly_scores=self.test,
              actual_anomalies=self.only_1_anomalies,
              metric="AUC_ROC",
          )
  
      # window must be int
      with pytest.raises(ValueError):
          show_anomalies_from_scores(
              series=self.train, anomaly_scores=self.test, window="1"
          )
      # window must be an int positive
      with pytest.raises(ValueError):
          show_anomalies_from_scores(
              series=self.train, anomaly_scores=self.test, window=-1
          )
      # window must smaller than the score series
      with pytest.raises(ValueError):
          show_anomalies_from_scores(
              series=self.train, anomaly_scores=self.test, window=200
          )
  
      # must have the same nbr of windows than scores
      with pytest.raises(ValueError):
          show_anomalies_from_scores(
              series=self.train, anomaly_scores=self.test, window=[1, 2]
          )
      with pytest.raises(ValueError):
          show_anomalies_from_scores(
              series=self.train,
              anomaly_scores=[self.test, self.test],
              window=[1, 2, 1],
          )
  
      # names_of_scorers must be str
      with pytest.raises(ValueError):
          show_anomalies_from_scores(
              series=self.train,
              anomaly_scores=self.test,
              names_of_scorers=2,
          )
      # nbr of names_of_scorers must match the nbr of scores
      with pytest.raises(ValueError):
          show_anomalies_from_scores(
              series=self.train,
              anomaly_scores=self.test,
              names_of_scorers=["scorer1", "scorer2"],
          )
      with pytest.raises(ValueError):
          show_anomalies_from_scores(
              series=self.train,
              anomaly_scores=[self.test, self.test],
              names_of_scorers=["scorer1", "scorer2", "scorer3"],
          )
  
      # title must be str
      with pytest.raises(ValueError):
          show_anomalies_from_scores(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 16 for calling the TestADAnomalyModel obj's underlying member method code with example usage: obj.test_show_anomalies_from_scores() without return types