code: def test_generic_estimator_for_regression():
      pipeline = make_pipeline(
          H2OAutoMLEstimator(
              estimator_type="regressor",
              seed=seed,
              init_connection_args=init_connection_args,
          )
      )
      pipeline.set_params(
          h2oautomlestimator__max_models=max_models,
          h2oautomlestimator__nfolds=3,
      )
      pipeline.named_steps.h2oautomlestimator.exclude_algos = [
          "XGBoost"
      ]
  
      data = _get_data(format="numpy", n_classes=0)
      assert isinstance(data.X_train, np.ndarray)
      pipeline.fit(data.X_train, data.y_train)
      assert (
          len(
              pipeline.named_steps.h2oautomlestimator.estimator.leaderboard
          )
          >= max_models + 1
      )
  
      preds = pipeline.predict(data.X_test)
      assert isinstance(preds, np.ndarray)
      assert preds.shape == (len(data.X_test),)
  
      score = pipeline.score(data.X_test, data.y_test)
      assert isinstance(score, float)
      skl_score = r2_score(data.y_test, preds)
      assert (
          abs(score - skl_score) < 1e-6
      ), "score={}, skl_score={}".format(score, skl_score)
  
file_path: h2o-3/h2o-py/tests/testdir_sklearn/pyunit_sklearn_automl_pipeline.py
imports: import importlib, inspect, os, sys
  import numpy
  from sklearn.datasets import make_classification, make_regression
  from sklearn.metrics import accuracy_score, r2_score
  from sklearn.model_selection import train_test_split
  from sklearn.pipeline import make_pipeline
  import h2o
  from h2o.sklearn import H2OAutoMLEstimator, H2OAutoMLClassifier, H2OAutoMLRegressor
  from h2o.sklearn.wrapper import H2OConnectionMonitorMixin
  from tests import pyunit_utils, Namespace
label_desc: Use image node_id 6 for calling a global function with example usage: test_generic_estimator_for_regression() without return types