code: def _to_list(
      series: Union[TimeSeries, Sequence[TimeSeries]]
  ) -> Sequence[TimeSeries]:
      """If not already, it converts the input into a sequence
  
      Parameters
      ----------
      series
          single TimeSeries, or a sequence of TimeSeries
  
      Returns
      -------
      Sequence[TimeSeries]
      """
  
      return [series] if not isinstance(series, Sequence) else series
  
file_path: darts/darts/ad/utils.py
imports: from typing import Sequence, Tuple, Union
  import matplotlib.pyplot
  import numpy
  from sklearn.metrics import accuracy_score, average_precision_score, f1_score, precision_score, recall_score, roc_auc_score
  from darts import TimeSeries
  from darts.logging import get_logger, raise_if, raise_if_not
label_desc: Use image node_id 9 for calling a global function with example usage: _to_list(series) and returns: unknown