code: def test_bayesian_oracle_maximize(tmp_path):
      hps = hp_module.HyperParameters()
      hps.Int("a", -100, 100)
  
      oracle = bo_module.BayesianOptimizationOracle(
          objective=keras_tuner.Objective("score", direction="max"),
          max_trials=20,
          hyperparameters=hps,
          num_initial_points=2,
      )
      oracle._set_project_dir(tmp_path, "untitled")
  
      # Make examples with high 'a' and high score.
      for i in range(5):
          trial = trial_module.Trial(hyperparameters=hps.copy())
          trial.hyperparameters.values["a"] = 10 * i
          trial.score = i
          trial.status = "COMPLETED"
          oracle.trials[trial.trial_id] = trial
  
      # Make examples with low 'a' and low score
      for i in range(5):
          trial = trial_module.Trial(hyperparameters=hps.copy())
          trial.hyperparameters.values["a"] = -10 * i
          trial.score = -i
          trial.status = "COMPLETED"
          oracle.trials[trial.trial_id] = trial
  
      trial = oracle.create_trial("tuner0")
      assert trial.status == "RUNNING"
      # Assert that the oracle suggests hps it thinks will maximize.
      assert trial.hyperparameters.get("a") > 0
  
imports: import math
  import numpy
  import pytest
  import keras_tuner
  from keras_tuner.backend import keras
  from keras_tuner.engine import hyperparameters
  from keras_tuner.engine import trial
  from keras_tuner.tuners import bayesian
label_desc: Use image node_id 11 for calling a global function with example usage: test_bayesian_oracle_maximize(tmp_path) without return types