class_docstr: Base class for all anomaly scorers
docstr: Checks if `actual_anomalies` contains only univariate series when the scorer has the
  parameter 'univariate_scorer' set to True.
  
  'univariate_scorer' is:
      True -> when the function of the scorer ``score(series)`` (or, if applicable,
          ``score_from_prediction(actual_series, pred_series)``) returns a univariate
          anomaly score regardless of the input `series` (or, if applicable, `actual_series`
          and `pred_series`).
      False -> when the scorer will return a series that has the
          same number of components as the input (can be univariate or multivariate).
docstr_tok: ["Checks","if","`","actual_anomalies","`","contains","only","univariate","series","when","the","scorer","has","the","parameter","'univariate_scorer","'","set","to","True",".","'univariate_scorer","'","is",":","True","-",">","when","the","function","of","the","scorer","``","score","(","series",")","``","(","or",",","if","applicable",",","``","score_from_prediction","(","actual_series",",","pred_series",")","``",")","returns","a","univariate","anomaly","score","regardless","of","the","input","`","series","`","(","or",",","if","applicable",",","`","actual_series","`","and","`","pred_series","`",")",".","False","-",">","when","the","scorer","will","return","a","series","that","has","the","same","number","of","components","as","the","input","(","can","be","univariate","or","multivariate",")","."]
code: def _check_univariate_scorer(
      self, actual_anomalies: Sequence[TimeSeries]
  ):
      """Checks if `actual_anomalies` contains only univariate series when the scorer has the
      parameter 'univariate_scorer' set to True.
  
      'univariate_scorer' is:
          True -> when the function of the scorer ``score(series)`` (or, if applicable,
              ``score_from_prediction(actual_series, pred_series)``) returns a univariate
              anomaly score regardless of the input `series` (or, if applicable, `actual_series`
              and `pred_series`).
          False -> when the scorer will return a series that has the
              same number of components as the input (can be univariate or multivariate).
      """
  
      if self.univariate_scorer:
          raise_if_not(
              all(
                  [isinstance(s, TimeSeries) for s in actual_anomalies]
              ),
              "all series in `actual_anomalies` must be of type TimeSeries.",
          )
  
          raise_if_not(
              all([s.width == 1 for s in actual_anomalies]),
              f"Scorer {self.__str__()} will return a univariate anomaly score series (width=1)."
              + " Found a multivariate `actual_anomalies`."
              + " The evaluation of the accuracy cannot be computed between the two 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 2 for calling the AnomalyScorer obj's underlying member method code with example usage: obj._check_univariate_scorer(actual_anomalies) without return types