code: def test_Norm(self):
      # component_wise must be bool
      with pytest.raises(ValueError):
          Norm(component_wise=1)
      with pytest.raises(ValueError):
          Norm(component_wise="string")
      # if component_wise=False must always return a univariate anomaly score
      scorer = Norm(component_wise=False)
      assert (
          scorer.score_from_prediction(
              self.test, self.modified_test
          ).width
          == 1
      )
      assert (
          scorer.score_from_prediction(
              self.mts_test, self.modified_mts_test
          ).width
          == 1
      )
      # if component_wise=True must always return the same width as the input
      scorer = Norm(component_wise=True)
      assert (
          scorer.score_from_prediction(
              self.test, self.modified_test
          ).width
          == 1
      )
      assert (
          scorer.score_from_prediction(
              self.mts_test, self.modified_mts_test
          ).width
          == self.mts_test.width
      )
  
      scorer = Norm(component_wise=True)
      # 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 (equivalent to abs diff)
      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 with component_wise set to True (equivalent to abs diff)
      # abs(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"]
      )
      # abs(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"]
      )
  
      scorer = Norm(component_wise=False)
  
      # always expects a deterministic input
  
      # univariate case (equivalent to abs diff)
      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 with component_wise set to False
      # norm(a - a + sqrt(2)) = 2 * len(a) with a being series of dim=2
      assert (
          abs(
              scorer.score_from_prediction(
                  self.mts_test, self.mts_test + np.sqrt(2)
              )
              .sum(axis=0)
              .all_values()
              .flatten()[0]
              - 2 * len(self.mts_test)
          )
          < 1e-05
      )
  
      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 6 for calling the TestADAnomalyScorer obj's underlying member method code with example usage: obj.test_Norm() without return types