class_docstr: Base class of scorers that do need training.
docstr: Applies the ``diff_fn`` to the two time series. Converts two time series into 1.
  
  series_1 and series_2 must:
      - have a non empty time intersection
      - be of the same width W
  
  Parameters
  ----------
  series_1
      1st time series
  series_2:
      2nd time series
  
  Returns
  -------
  TimeSeries
      series of width W
docstr_tok: ["Applies","the","``","diff_fn","``","to","the","two","time","series",".","Converts","two","time","series","into","1.","series_1","and","series_2","must",":","-","have","a","non","empty","time","intersection","-","be","of","the","same","width","W","Parameters","--","--","--","--","--","series_1","1st","time","series","series_2",":","2nd","time","series","Returns","--","--","--","-","TimeSeries","series","of","width","W"]
code: def _diff_series(
      self, series_1: TimeSeries, series_2: TimeSeries
  ) -> TimeSeries:
      """Applies the ``diff_fn`` to the two time series. Converts two time series into 1.
  
      series_1 and series_2 must:
          - have a non empty time intersection
          - be of the same width W
  
      Parameters
      ----------
      series_1
          1st time series
      series_2:
          2nd time series
  
      Returns
      -------
      TimeSeries
          series of width W
      """
      series_1, series_2 = _intersect(series_1, series_2)
  
      if self.diff_fn == "abs_diff":
          return (series_1 - series_2).map(lambda x: np.abs(x))
      elif self.diff_fn == "diff":
          return series_1 - series_2
      else:
          # found an non-existent diff_fn
          raise ValueError(
              f"Metric should be 'diff' or 'abs_diff', found {self.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 11 for calling the FittableAnomalyScorer obj's underlying member method code with example usage: obj._diff_series(series_1, series_2) and returns: unknown, unknown