code: def test_hyperband_oracle_one_sweep_single_thread(tmp_path):
      hp = keras_tuner.HyperParameters()
      hp.Float("a", -100, 100)
      hp.Float("b", -100, 100)
      oracle = hyperband_module.HyperbandOracle(
          hyperparameters=hp,
          objective=keras_tuner.Objective("score", "max"),
          hyperband_iterations=1,
          max_epochs=9,
          factor=3,
      )
      oracle._set_project_dir(tmp_path, "untitled")
  
      score = 0
      for bracket_num in reversed(range(oracle._get_num_brackets())):
          for round_num in range(oracle._get_num_rounds(bracket_num)):
              for _ in range(oracle._get_size(bracket_num, round_num)):
                  trial = oracle.create_trial("tuner0")
                  assert trial.status == "RUNNING"
                  score += 1
                  oracle.update_trial(trial.trial_id, {"score": score})
                  trial.status = "COMPLETED"
                  oracle.end_trial(trial)
              assert len(
                  oracle._brackets[0]["rounds"][round_num]
              ) == oracle._get_size(bracket_num, round_num)
          assert len(oracle._brackets) == 1
  
      # Iteration should now be complete.
      trial = oracle.create_trial("tuner0")
      assert trial.status == "STOPPED", oracle.hyperband_iterations
      assert len(oracle.ongoing_trials) == 0
  
      # Brackets should all be finished and removed.
      assert len(oracle._brackets) == 0
  
      best_trial = oracle.get_best_trials()[0]
      assert best_trial.score == score
  
file_path: keras-tuner/keras_tuner/tuners/hyperband_test.py
imports: import numpy
  import pytest
  import keras_tuner
  from keras_tuner import backend
  from keras_tuner import utils
  from keras_tuner.backend import keras
  from keras_tuner.engine import tuner_utils
  from keras_tuner.tuners import hyperband
label_desc: Use image node_id 3 for calling a global function with example usage: test_hyperband_oracle_one_sweep_single_thread(tmp_path) without return types