class_docstr: Base class for all anomaly scorers
docstr: Checks if the series is deterministic (number of samples is equal to one).
docstr_tok: ["Checks","if","the","series","is","deterministic","(","number","of","samples","is","equal","to","one",")","."]
code: def _assert_deterministic(self, series: TimeSeries, name_series: str):
      "Checks if the series is deterministic (number of samples is equal to one)."
  
      if not series.is_deterministic:
          logger.warning(
              f"Scorer {self.__str__()} is expecting `{name_series}` to be a (sequence of) deterministic"
              + f" timeseries (number of samples must be equal to 1, found: {series.n_samples}). The "
              + "series will be converted to a deterministic series by taking the median of the samples.",
          )
          series = series.quantile_timeseries(quantile=0.5)
  
      return series
  
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 6 for calling the AnomalyScorer obj's underlying member method code with example usage: obj._assert_deterministic(series, name_series) and returns: series