class_docstr: A Pipeline object chains transformers and a detector sequentially.
  
  Parameters
  ----------
  steps: list of 2-tuples (str, object)
      Components of this pipeline. Each 2-tuple represents a step in the
      pipeline (step name, model object).
  
  Examples
  --------
  >>> steps = [('moving average', RollingAggregate(agg='mean', window=10)),
               ('filter quantile 0.99', QuantileAD(high=0.99))]
  >>> myPipeline = Pipeline(steps)
docstr: Transform time series sequentially along pipeline, and detect
  anomalies with the last detector.
  
  Parameters
  ----------
  ts: pandas Series or DataFrame
      Time series to detect anomalies from.
  
  return_intermediate: bool, optional
      Whether to return intermediate results. Default: False.
  
  return_list: bool, optional
      Whether to return a list of anomalous events, or a binary series
      indicating normal/anomalous. Default: False.
  
  Returns
  -------
  pandas Series, pandas DataFrame, list, or dict
      Detected anomalies.
  
      - If return_intermediate=False, return detected anomalies, i.e.
        result from last detector.
      - If return_intermediate=True, return results of all models in
        pipeline as a dict where each item represents the result of a
        model.
      - If return_list=False, result from a detector or an aggregator
        will be a binary pandas Series indicating normal/anomalous.
      - If return_list=True, result from a detector or an aggregator
        will be a list of events where an event is a pandas Timestamp if
        it is instantaneous or a 2-tuple of pandas Timestamps if it is a
        closed time interval.
docstr_tok: ["Transform","time","series","sequentially","along","pipeline",",","and","detect","anomalies","with","the","last","detector",".","Parameters","--","--","--","--","--","ts",":","pandas","Series","or","DataFrame","Time","series","to","detect","anomalies","from",".","return_intermediate",":","bool",",","optional","Whether","to","return","intermediate","results",".","Default",":","False",".","return_list",":","bool",",","optional","Whether","to","return","a","list","of","anomalous","events",",","or","a","binary","series","indicating","normal\/anomalous",".","Default",":","False",".","Returns","--","--","--","-","pandas","Series",",","pandas","DataFrame",",","list",",","or","dict","Detected","anomalies",".","-","If","return_intermediate=False",",","return","detected","anomalies",",","i.e",".","result","from","last","detector",".","-","If","return_intermediate=True",",","return","results","of","all","models","in","pipeline","as","a","dict","where","each","item","represents","the","result","of","a","model",".","-","If","return_list=False",",","result","from","a","detector","or","an","aggregator","will","be","a","binary","pandas","Series","indicating","normal\/anomalous",".","-","If","return_list=True",",","result","from","a","detector","or","an","aggregator","will","be","a","list","of","events","where","an","event","is","a","pandas","Timestamp","if","it","is","instantaneous","or","a","2-tuple","of","pandas","Timestamps","if","it","is","a","closed","time","interval","."]
code: def detect(
      self,
      ts: Union[pd.Series, pd.DataFrame],
      return_intermediate: bool = False,
      return_list: bool = False,
  ) -> Union[
      Union[
          pd.Series,
          pd.DataFrame,
          List[Union[Tuple[pd.Timestamp, pd.Timestamp], pd.Timestamp]],
          Dict[
              str,
              List[
                  Union[Tuple[pd.Timestamp, pd.Timestamp], pd.Timestamp]
              ],
          ],
      ],
      Dict[
          str,
          Union[
              pd.Series,
              pd.DataFrame,
              List[
                  Union[Tuple[pd.Timestamp, pd.Timestamp], pd.Timestamp]
              ],
              Dict[
                  str,
                  List[
                      Union[
                          Tuple[pd.Timestamp, pd.Timestamp],
                          pd.Timestamp,
                      ]
                  ],
              ],
          ],
      ],
  ]:
      """Transform time series sequentially along pipeline, and detect
      anomalies with the last detector.
  
      Parameters
      ----------
      ts: pandas Series or DataFrame
          Time series to detect anomalies from.
  
      return_intermediate: bool, optional
          Whether to return intermediate results. Default: False.
  
      return_list: bool, optional
          Whether to return a list of anomalous events, or a binary series
          indicating normal/anomalous. Default: False.
  
      Returns
      -------
      pandas Series, pandas DataFrame, list, or dict
          Detected anomalies.
  
          - If return_intermediate=False, return detected anomalies, i.e.
            result from last detector.
          - If return_intermediate=True, return results of all models in
            pipeline as a dict where each item represents the result of a
            model.
          - If return_list=False, result from a detector or an aggregator
            will be a binary pandas Series indicating normal/anomalous.
          - If return_list=True, result from a detector or an aggregator
            will be a list of events where an event is a pandas Timestamp if
            it is instantaneous or a 2-tuple of pandas Timestamps if it is a
            closed time interval.
  
  
      """
      self._update_internal_pipenet()
      return self._pipenet.detect(
          ts=ts,
          return_intermediate=return_intermediate,
          return_list=return_list,
      )
  
imports: from collections import OrderedDict
  from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  import matplotlib.pyplot
  import pandas
  from matplotlib.collections import PatchCollection
  from matplotlib.lines import Line2D
  from matplotlib.patches import Circle
  from tabulate import tabulate
  from .._aggregator_base import _Aggregator
  from .._base import _Model, _TrainableModel
  from .._detector_base import _NonTrainableUnivariateDetector, _TrainableMultivariateDetector, _TrainableUnivariateDetector
  from .._transformer_base import _NonTrainableMultivariateTransformer, _NonTrainableUnivariateTransformer, _TrainableMultivariateTransformer, _TrainableUnivariateTransformer
  from ..metrics import f1_score, iou, precision, recall
label_desc: Use image node_id 4 for calling the Pipeline obj's underlying member method code with example usage: obj.detect(ts, return_intermediate, return_list) and returns: self