class_docstr: This pipeline extends the sklearn Pipeline to support transformers that change X, y,
  sample_weight, and the number of samples.
  
  It also adds some new options for setting hyper-parameters with callables and in reference to
  other parameters (see examples).
  
  Parameters
  ----------
  steps : list
      List of (name, transform) tuples (implementing fit/transform) that are chained, in the
      order in which they are chained, with the last object an estimator.
  scorer : sklearn scorer object
  memory : currently not implemented
  
  Attributes
  ----------
  N_train : number of training samples - available after calling fit method
  N_test : number of testing samples - available after calling predict, or score methods
  
  Examples
  --------
  
  >>> from seglearn.transform import FeatureRep, SegmentX
  >>> from seglearn.pipe import Pype
  >>> from seglearn.datasets import load_watch
  >>> from sklearn.ensemble import RandomForestClassifier
  >>> from sklearn.preprocessing import StandardScaler
  >>> data = load_watch()
  >>> X = data['X']
  >>> y = data['y']
  >>> pipe = Pype([('segment', SegmentX()),
  >>>              ('features', FeatureRep()),
  >>>              ('scaler', StandardScaler()),
  >>>              ('rf', RandomForestClassifier())])
  >>> pipe.fit(X, y)
  >>> print(pipe.score(X, y))
docstr: Fit the model and transform with the final estimator
  Fits all the transforms one after the other and transforms the
  data, then uses fit_transform on transformed data with the final
  estimator.
  
  Parameters
  ----------
  X : iterable
      Training data. Must fulfill input requirements of first step of the
      pipeline.
  y : iterable, default=None
      Training targets. Must fulfill label requirements for all steps of
      the pipeline.
  **fit_params : dict of string -> object
      Parameters passed to the ``fit`` method of each step, where
      each parameter name is prefixed such that parameter ``p`` for step
      ``s`` has key ``s__p``.
  
  Returns
  -------
  Xt : array-like, shape = [n_samples, n_transformed_features]
      Transformed samples
  yt : array-like, shape = [n_samples]
      Transformed target
docstr_tok: ["Fit","the","model","and","transform","with","the","final","estimator","Fits","all","the","transforms","one","after","the","other","and","transforms","the","data",",","then","uses","fit_transform","on","transformed","data","with","the","final","estimator",".","Parameters","--","--","--","--","--","X",":","iterable","Training","data",".","Must","fulfill","input","requirements","of","first","step","of","the","pipeline",".","y",":","iterable",",","default=None","Training","targets",".","Must","fulfill","label","requirements","for","all","steps","of","the","pipeline",".","*","*","fit_params",":","dict","of","string","-",">","object","Parameters","passed","to","the","``","fit","``","method","of","each","step",",","where","each","parameter","name","is","prefixed","such","that","parameter","``","p","``","for","step","``","s","``","has","key","``","s__p","``",".","Returns","--","--","--","-","Xt",":","array-like",",","shape","=","[","n_samples",",","n_transformed_features","]","Transformed","samples","yt",":","array-like",",","shape","=","[","n_samples","]","Transformed","target"]
code: def fit_transform(self, X, y=None, **fit_params):
      """
      Fit the model and transform with the final estimator
      Fits all the transforms one after the other and transforms the
      data, then uses fit_transform on transformed data with the final
      estimator.
  
      Parameters
      ----------
      X : iterable
          Training data. Must fulfill input requirements of first step of the
          pipeline.
      y : iterable, default=None
          Training targets. Must fulfill label requirements for all steps of
          the pipeline.
      **fit_params : dict of string -> object
          Parameters passed to the ``fit`` method of each step, where
          each parameter name is prefixed such that parameter ``p`` for step
          ``s`` has key ``s__p``.
  
      Returns
      -------
      Xt : array-like, shape = [n_samples, n_transformed_features]
          Transformed samples
      yt : array-like, shape = [n_samples]
          Transformed target
      """
  
      Xt, yt, fit_params = self._fit(X, y, **fit_params)
  
      if isinstance(self._final_estimator, XyTransformerMixin):
          Xt, yt, _ = self._final_estimator.fit_transform(Xt, yt)
      else:
          if hasattr(self._final_estimator, "fit_transform"):
              Xt = self._final_estimator.fit_transform(Xt, yt)
          else:
              self._final_estimator.fit(Xt, yt)
              Xt = self._final_estimator.transform(Xt)
  
      self.N_fit = len(yt)
  
      return Xt, yt
  
imports: import numpy
  from sklearn.base import BaseEstimator
  from sklearn.pipeline import Pipeline
  from .transform import XyTransformerMixin, Segment
  from .util import segmented_prediction_to_series
label_desc: Use image node_id 6 for calling the Pype obj's underlying member method code with example usage: obj.fit_transform(X, y) and returns: Xt,  yt