class_docstr: Base class for all anomaly models.
code: def __init__(self, model, scorer):
      self.scorers = _to_list(scorer)
  
      raise_if_not(
          all([isinstance(s, AnomalyScorer) for s in self.scorers]),
          "all scorers must be of instance darts.ad.scorers.AnomalyScorer.",
      )
  
      self.scorers_are_trainable = any(
          s.trainable for s in self.scorers
      )
      self.univariate_scoring = any(
          s.univariate_scorer for s in self.scorers
      )
  
      self.model = model
  
file_path: darts/darts/ad/anomaly_model/anomaly_model.py
imports: from abc import ABC, abstractmethod
  from typing import Dict, Sequence, Union
  from darts.ad.scorers.scorers import AnomalyScorer
  from darts.ad.utils import _to_list, eval_accuracy_from_scores, show_anomalies_from_scores
  from darts.logging import raise_if_not
  from darts.timeseries import TimeSeries
label_desc: Use image node_id 1 to create a new AnomalyModel object from inherited base classes: ABC with example: obj = AnomalyModel(model, scorer)