code: def test_Difference(self):
      scorer = Difference()
  
      # always expects a deterministic input
      with pytest.raises(ValueError):
          scorer.score_from_prediction(self.train, self.probabilistic)
      with pytest.raises(ValueError):
          scorer.score_from_prediction(self.probabilistic, self.train)
  
      # univariate case
      assert scorer.score_from_prediction(self.test, self.test + 1).sum(
          axis=0
      ).all_values().flatten()[0] == -len(self.test)
      assert scorer.score_from_prediction(self.test + 1, self.test).sum(
          axis=0
      ).all_values().flatten()[0] == len(self.test)
  
      # multivariate case
      # output of score() must be the same width as the width of the input
      assert (
          scorer.score_from_prediction(
              self.mts_test, self.mts_test
          ).width
          == self.mts_test.width
      )
  
      # a - 2a = - a
      assert (
          scorer.score_from_prediction(
              self.mts_test, self.mts_test * 2
          )["0"]
          == -self.mts_test["0"]
      )
      assert (
          scorer.score_from_prediction(
              self.mts_test, self.mts_test * 2
          )["1"]
          == -self.mts_test["1"]
      )
      # 2a - a =  a
      assert (
          scorer.score_from_prediction(
              self.mts_test * 2, self.mts_test
          )["0"]
          == self.mts_test["0"]
      )
      assert (
          scorer.score_from_prediction(
              self.mts_test * 2, self.mts_test
          )["1"]
          == self.mts_test["1"]
      )
  
      assert not scorer.is_probabilistic
  
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 7 for calling the TestADAnomalyScorer obj's underlying member method code with example usage: obj.test_Difference() without return types