code: def transformation_test(clf, X, y):
      clf.fit(X, y)
      Xtr1, ytr1 = clf.transform(X, y)
      Xtr2, ytr2 = clf.fit_transform(X, y)
      assert np.all(Xtr1 == Xtr2)
      assert np.all(ytr1 == ytr2)
      assert np.all(np.isin(np.unique(ytr1), yvals(y)))
      assert len(Xtr1) == len(ytr1)
  
file_path: seglearn/seglearn/tests/test_pipe.py
imports: import numpy
  import pandas
  import pytest
  from sklearn.ensemble import RandomForestClassifier
  from sklearn.linear_model import Ridge
  from sklearn.model_selection import cross_validate
  from sklearn.preprocessing import StandardScaler
  from seglearn.base import TS_Data
  from seglearn.pipe import Pype
  from seglearn.transform import FeatureRep, SegmentX, SegmentXY, SegmentXYForecast, PadTrunc
label_desc: Use image node_id 2 for calling a global function with example usage: transformation_test(clf, X, y) without return types