code: def _intersect(
      series_1: TimeSeries,
      series_2: TimeSeries,
  ) -> Tuple[TimeSeries, TimeSeries]:
      """Returns the sub-series of series_1 and of series_2 that share the same time index.
      (Intersection in time of the two time series)
  
      Parameters
      ----------
      series_1
          1st time series
      series_2:
          2nd time series
  
      Returns
      -------
      Tuple[TimeSeries, TimeSeries]
      """
  
      new_series_1 = series_1.slice_intersect(series_2)
      raise_if(
          len(new_series_1) == 0,
          "Time intersection between the two series must be non empty.",
      )
  
      return new_series_1, series_2.slice_intersect(series_1)
  
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 5 for calling a global function with example usage: _intersect(series_1, series_2) and returns: new_series_1,  series_2