code: def test_h2o_only_pipeline_with_h2o_frames():
      pipeline = Pipeline(
          [
              ("standardize", H2OScaler()),
              ("pca", H2OPCA(k=2, seed=seed)),
              ("estimator", H2OGradientBoostingRegressor(seed=seed)),
          ]
      )
      data = _get_data(format="h2o")
      assert isinstance(data.X_train, h2o.H2OFrame)
      pipeline.fit(data.X_train, data.y_train)
      preds = pipeline.predict(data.X_test)
      assert isinstance(preds, h2o.H2OFrame)
      assert preds.dim == [len(data.X_test), 1]
  
      # to get it working, we need to score a fresh H2OFrame
      data = _get_data(format="h2o")
      score = pipeline.score(data.X_test, data.y_test)
      assert isinstance(score, float)
      skl_score = r2_score(
          data.y_test.as_data_frame().values,
          preds.as_data_frame().values,
      )
      assert (
          abs(score - skl_score) < 1e-6
      ), "score={}, skl_score={}".format(score, skl_score)
      scores["h2o_only_pipeline_with_h2o_frame"] = score
  
file_path: h2o-3/h2o-py/tests/testdir_sklearn/pyunit_sklearn_regression_pipeline.py
imports: import importlib, inspect, os, sys
  import numpy
  from sklearn.datasets import make_regression
  from sklearn.decomposition import PCA
  from sklearn.metrics import r2_score
  from sklearn.model_selection import train_test_split
  from sklearn.pipeline import Pipeline
  from sklearn.preprocessing import StandardScaler
  import h2o
  from h2o.sklearn import H2OGradientBoostingEstimator, H2OGradientBoostingRegressor, H2OScaler, H2OPCA
  from h2o.sklearn.wrapper import H2OConnectionMonitorMixin
  from tests import pyunit_utils, Namespace
label_desc: Use image node_id 2 for calling a global function with example usage: test_h2o_only_pipeline_with_h2o_frames() without return types