code: def _assert_timeseries(series: TimeSeries, message: str = None):
      """Checks if given input is of type Darts TimeSeries"""
  
      raise_if_not(
          isinstance(series, TimeSeries),
          "{} must be type darts.timeseries.TimeSeries and not {}.".format(
              message if message is not None else "Series input",
              type(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 6 for calling a global function with example usage: _assert_timeseries(series, message) without return types