code: def test_FittableAnomalyScorer(self):
      for scorer in list_FittableAnomalyScorer:
          # Need to call fit() before calling score()
          with pytest.raises(ValueError):
              scorer.score(self.test)
  
          # Need to call fit() before calling score_from_prediction()
          with pytest.raises(ValueError):
              scorer.score_from_prediction(
                  self.test, self.modified_test
              )
  
          # Check if trainable is True, being a FittableAnomalyScorer
          assert scorer.trainable
  
          # Check if _fit_called is False
          assert not scorer._fit_called
  
          # fit on sequence with series that have different width
          with pytest.raises(ValueError):
              scorer.fit([self.train, self.mts_train])
  
          # fit on sequence with series that have different width
          with pytest.raises(ValueError):
              scorer.fit_from_prediction(
                  [self.train, self.mts_train],
                  [self.modified_train, self.modified_mts_train],
              )
  
          # checks for fit_from_prediction()
          # input must be Timeseries or sequence of Timeseries
          with pytest.raises(ValueError):
              scorer.score_from_prediction(self.train, "str")
          with pytest.raises(ValueError):
              scorer.score_from_prediction(
                  [self.train, self.train], [self.modified_train, "str"]
              )
          # two inputs must have the same length
          with pytest.raises(ValueError):
              scorer.fit_from_prediction(
                  [self.train, self.train], [self.modified_train]
              )
          # two inputs must have the same width
          with pytest.raises(ValueError):
              scorer.fit_from_prediction(
                  [self.train], [self.modified_mts_train]
              )
          # every element must have the same width
          with pytest.raises(ValueError):
              scorer.fit_from_prediction(
                  [self.train, self.mts_train],
                  [self.modified_train, self.modified_mts_train],
              )
          # two inputs must have a non zero intersection
          with pytest.raises(ValueError):
              scorer.fit_from_prediction(
                  self.train[:50], self.train[55:]
              )
          # every pairwise element must have a non zero intersection
          with pytest.raises(ValueError):
              scorer.fit_from_prediction(
                  [self.train, self.train[:50]],
                  [self.train, self.train[55:]],
              )
  
          # checks for fit()
          # input must be Timeseries or sequence of Timeseries
          with pytest.raises(ValueError):
              scorer.fit("str")
          with pytest.raises(ValueError):
              scorer.fit([self.modified_train, "str"])
  
          # checks for score_from_prediction()
          scorer.fit_from_prediction(self.train, self.modified_train)
          # input must be Timeseries or sequence of Timeseries
          with pytest.raises(ValueError):
              scorer.score_from_prediction(self.train, "str")
          with pytest.raises(ValueError):
              scorer.score_from_prediction(
                  [self.train, self.train], [self.modified_train, "str"]
              )
          # two inputs must have the same length
          with pytest.raises(ValueError):
              scorer.score_from_prediction(
                  [self.train, self.train], [self.modified_train]
              )
          # two inputs must have the same width
          with pytest.raises(ValueError):
              scorer.score_from_prediction(
                  [self.train], [self.modified_mts_train]
              )
          # every element must have the same width
          with pytest.raises(ValueError):
              scorer.score_from_prediction(
                  [self.train, self.mts_train],
                  [self.modified_train, self.modified_mts_train],
              )
          # two inputs must have a non zero intersection
          with pytest.raises(ValueError):
              scorer.score_from_prediction(
                  self.train[:50], self.train[55:]
              )
          # every pairwise element must have a non zero intersection
          with pytest.raises(ValueError):
              scorer.score_from_prediction(
                  [self.train, self.train[:50]],
                  [self.train, self.train[55:]],
              )
  
          # checks for score()
          # input must be Timeseries or sequence of Timeseries
          with pytest.raises(ValueError):
              scorer.score("str")
          with pytest.raises(ValueError):
              scorer.score([self.modified_train, "str"])
  
          # caseA: fit with fit()
          # case1: fit on UTS
          scorerA1 = scorer
          scorerA1.fit(self.train)
          # Check if _fit_called is True after being fitted
          assert scorerA1._fit_called
          with pytest.raises(ValueError):
              # series must be same width as series used for training
              scorerA1.score(self.mts_test)
          # case2: fit on MTS
          scorerA2 = scorer
          scorerA2.fit(self.mts_train)
          # Check if _fit_called is True after being fitted
          assert scorerA2._fit_called
          with pytest.raises(ValueError):
              # series must be same width as series used for training
              scorerA2.score(self.test)
  
          # caseB: fit with fit_from_prediction()
          # case1: fit on UTS
          scorerB1 = scorer
          scorerB1.fit_from_prediction(self.train, self.modified_train)
          # Check if _fit_called is True after being fitted
          assert scorerB1._fit_called
          with pytest.raises(ValueError):
              # series must be same width as series used for training
              scorerB1.score_from_prediction(
                  self.mts_test, self.modified_mts_test
              )
          # case2: fit on MTS
          scorerB2 = scorer
          scorerB2.fit_from_prediction(
              self.mts_train, self.modified_mts_train
          )
          # Check if _fit_called is True after being fitted
          assert scorerB2._fit_called
          with pytest.raises(ValueError):
              # series must be same width as series used for training
              scorerB2.score_from_prediction(
                  self.test, self.modified_test
              )
  
imports: from typing import Sequence
  import numpy
  import pytest
  import sklearn
  from pyod.models.knn import KNN
  from scipy.stats import cauchy, expon, gamma, laplace, norm, poisson
  from darts import TimeSeries
  from darts.ad.scorers import CauchyNLLScorer
  from darts.ad.scorers import DifferenceScorer
  from darts.ad.scorers import ExponentialNLLScorer, GammaNLLScorer, GaussianNLLScorer, KMeansScorer, LaplaceNLLScorer
  from darts.ad.scorers import NormScorer
  from darts.ad.scorers import PoissonNLLScorer, PyODScorer, WassersteinScorer
  from darts.models import MovingAverageFilter
label_desc: Use image node_id 5 for calling the TestADAnomalyScorer obj's underlying member method code with example usage: obj.test_FittableAnomalyScorer() without return types