code: def test_mixed_pipeline_with_numpy_arrays():
      # Note that in normal situations (release build), init_connection_args can be omitted
      # otherwise, it should be set to the first H2O element in the pipeline
      pipeline = Pipeline(
          [
              ("svd", TruncatedSVD(n_components=3, random_state=seed)),
              (
                  "estimator",
                  H2OGradientBoostingClassifier(
                      seed=seed,
                      init_connection_args=init_connection_args,
                  ),
              ),
          ]
      )
      data = _get_data(format="numpy")
      assert isinstance(data.X_train, np.ndarray)
      pipeline.fit(data.X_train, data.y_train)
      preds = pipeline.predict(data.X_test)
      assert isinstance(preds, np.ndarray)
      assert preds.shape == (len(data.X_test),)
      probs = pipeline.predict_proba(data.X_test)
      assert probs.shape == (len(data.X_test), 2)
      assert np.allclose(
          np.sum(probs, axis=1), 1.0
      ), "`predict_proba` didn't return probabilities"
  
      score = pipeline.score(data.X_test, data.y_test)
      assert isinstance(score, float)
      skl_score = accuracy_score(data.y_test, preds)
      assert abs(score - skl_score) < 1e-6
      scores["mixed_pipeline_with_numpy_arrays"] = score
  
file_path: h2o-3/h2o-py/tests/testdir_sklearn/pyunit_sklearn_classification_pipeline.py
imports: import importlib, inspect, os, sys
  import numpy
  from sklearn.datasets import make_classification
  from sklearn.decomposition import TruncatedSVD
  from sklearn.metrics import accuracy_score
  from sklearn.model_selection import train_test_split
  from sklearn.pipeline import Pipeline
  import h2o
  from h2o.sklearn import H2OGradientBoostingEstimator, H2OGradientBoostingClassifier, H2OSVD
  from h2o.sklearn.wrapper import H2OConnectionMonitorMixin
  from tests import pyunit_utils, Namespace
label_desc: Use image node_id 4 for calling a global function with example usage: test_mixed_pipeline_with_numpy_arrays() without return types