code: def _sanity_check_two_series(
      series_1: TimeSeries,
      series_2: TimeSeries,
  ):
      """Performs sanity check on the two given inputs
  
      Checks if the two inputs:
          - type is Darts Timeseries
          - have the same number of components
          - if their intersection in time is not null
  
      Parameters
      ----------
      series_1
          1st time series
      series_2:
          2nd time series
      """
  
      _assert_timeseries(series_1)
      _assert_timeseries(series_2)
  
      # check if the two inputs time series have the same number of components
      raise_if_not(
          series_1.width == series_2.width,
          "Series must have the same number of components,"
          + f" found {series_1.width} and {series_2.width}.",
      )
  
      # check if the time intersection between the two inputs time series is not empty
      raise_if_not(
          len(series_1.time_index.intersection(series_2.time_index))
          > 0,
          "Series must have a non-empty intersection timestamps.",
      )
  
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 7 for calling a global function with example usage: _sanity_check_two_series(series_1, series_2) without return types