class_docstr: Base class of scorers that do need training.
code: def __init__(
      self, univariate_scorer, window, diff_fn="abs_diff"
  ) -> None:
      super().__init__(
          univariate_scorer=univariate_scorer, window=window
      )
  
      # indicates if the scorer is trainable or not
      self.trainable = True
  
      # indicates if the scorer has been trained yet
      self._fit_called = False
  
      # function used in ._diff_series() to convert 2 time series into 1
      if diff_fn in {"abs_diff", "diff"}:
          self.diff_fn = diff_fn
      else:
          raise ValueError(
              f"Metric should be 'diff' or 'abs_diff', found {diff_fn}"
          )
  
imports: from abc import ABC, abstractmethod
  from typing import Any, Sequence, Union
  import numpy
  from darts import TimeSeries
  from darts.ad.utils import _assert_same_length, _assert_timeseries, _intersect, _sanity_check_two_series, _to_list, eval_accuracy_from_scores, show_anomalies_from_scores
  from darts.logging import get_logger, raise_if_not
label_desc: Use image node_id 1 to create a new FittableAnomalyScorer object from inherited base classes: AnomalyScorer with example: obj = FittableAnomalyScorer(univariate_scorer, window, diff_fn)