code: def test_bayesian_save_reload(tmp_path):
      hps = hp_module.HyperParameters()
      hps.Choice("a", [1, 2], default=1)
      hps.Choice("b", [3, 4], default=3)
      hps.Choice("c", [5, 6], default=5)
      hps.Choice("d", [7, 8], default=7)
      hps.Choice("e", [9, 0], default=9)
      oracle = bo_module.BayesianOptimizationOracle(
          objective=keras_tuner.Objective("score", "max"),
          max_trials=20,
          hyperparameters=hps,
      )
      oracle._set_project_dir(tmp_path, "untitled")
  
      for _ in range(3):
          trial = oracle.create_trial("tuner_id")
          oracle.update_trial(trial.trial_id, {"score": 1.0})
          trial.status = "COMPLETED"
          oracle.end_trial(trial)
  
      oracle.save()
      oracle = bo_module.BayesianOptimizationOracle(
          objective=keras_tuner.Objective("score", "max"),
          max_trials=20,
          hyperparameters=hps,
      )
      oracle._set_project_dir(tmp_path, "untitled")
      oracle.reload()
  
      for _ in range(3):
          trial = oracle.create_trial("tuner_id")
          oracle.update_trial(trial.trial_id, {"score": 1.0})
          trial.status = "COMPLETED"
          oracle.end_trial(trial)
  
      assert len(oracle.trials) == 6
  
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 7 for calling a global function with example usage: test_bayesian_save_reload(tmp_path) without return types