code: def test_transformer():
      """[Parallel | Transform] test run transformer as estimator"""
      _, tr = est.get_learner("stack", True, True)
  
      data = Data("stack", True, True, True)
      X, y = data.get_data((25, 4), 3)
  
      F = _run(tr, "fit", X, y, return_preds=True)
      H = _run(tr, "transform", X, y, return_preds=True)
      P = _run(tr, "predict", X, y, return_preds=True)
      Z, _ = tr.estimator.fit_transform(X)
      G = _run(tr, "fit", X, y, return_preds=True, refit=False)
  
      np.testing.assert_array_equal(H, F)
      np.testing.assert_array_equal(Z, P)
      np.testing.assert_array_equal(G, F)
  
imports: import numpy
  from mlens.testing import Data, EstimatorContainer
  from mlens.parallel import Group, Learner, Pipeline, run
  from mlens.utils.dummy import OLS, Scale
  from mlens.externals.sklearn.base import clone
label_desc: Use image node_id 7 for calling a global function with example usage: test_transformer() without return types