code: def test_sklearn_sample_weight(tmp_path):
      tuner = keras_tuner.SklearnTuner(
          oracle=keras_tuner.oracles.BayesianOptimizationOracle(
              objective=keras_tuner.Objective("score", "max"),
              max_trials=10,
          ),
          hypermodel=build_model,
          directory=tmp_path,
      )
  
      x = np.random.uniform(size=(50, 10))
      y = np.random.randint(0, 2, size=(50,))
      sample_weight = np.random.uniform(0.1, 1, size=(50,))
      tuner.search(x, y, sample_weight=sample_weight)
  
      assert len(tuner.oracle.trials) == 10
  
      best_trial = tuner.oracle.get_best_trials()[0]
      assert best_trial.status == "COMPLETED"
      assert best_trial.score is not None
      assert best_trial.best_step == 0
      assert best_trial.metrics.exists("score")
  
      # Make sure best model can be reloaded.
      best_model = tuner.get_best_models()[0]
      best_model.score(x, y)
  
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 7 for calling a global function with example usage: test_sklearn_sample_weight(tmp_path) without return types