code: def test_sklearn_real_data(tmp_path):
      tuner = keras_tuner.SklearnTuner(
          oracle=keras_tuner.oracles.BayesianOptimizationOracle(
              objective=keras_tuner.Objective("score", "max"),
              max_trials=10,
          ),
          hypermodel=build_model,
          scoring=metrics.make_scorer(metrics.accuracy_score),
          metrics=metrics.accuracy_score,
          cv=model_selection.StratifiedKFold(5),
          directory=tmp_path,
      )
  
      x, y = datasets.load_iris(return_X_y=True)
      (
          x_train,
          x_test,
          y_train,
          y_test,
      ) = model_selection.train_test_split(x, y, test_size=0.2)
  
      tuner.search(x_train, y_train)
  
      best_models = tuner.get_best_models(10)
      best_model = best_models[0]
      worst_model = best_models[9]
      best_model_score = best_model.score(x_test, y_test)
      worst_model_score = worst_model.score(x_test, y_test)
  
      assert best_model_score > 0.8
      assert best_model_score >= worst_model_score
  
imports: import numpy
  import pandas
  import pytest
  from sklearn import datasets
  from sklearn import decomposition
  from sklearn import ensemble
  from sklearn import linear_model
  from sklearn import metrics
  from sklearn import model_selection
  from sklearn import neighbors
  from sklearn import pipeline
  import keras_tuner
label_desc: Use image node_id 10 for calling a global function with example usage: test_sklearn_real_data(tmp_path) without return types