code: def test_oracle_reload_ongoing_trials_to_retry(tmp_path):
      oracle = OracleStub(
          directory=tmp_path,
          objective="val_loss",
          max_retries_per_trial=1,
      )
      trial_1 = oracle.create_trial(tuner_id="a")
      trial_2 = oracle.create_trial(tuner_id="b")
  
      oracle_2 = OracleStub(
          directory=tmp_path,
          objective="val_loss",
          max_retries_per_trial=1,
      )
      oracle_2.reload()
  
      trial_3 = oracle.create_trial(tuner_id="a")
      trial_4 = oracle.create_trial(tuner_id="b")
  
      assert set([trial_3.trial_id, trial_4.trial_id]) == set(
          [trial_1.trial_id, trial_2.trial_id]
      )
  
imports: import datetime
  import threading
  import time
  import numpy
  import pytest
  import keras_tuner
  from keras_tuner.engine import oracle
  from keras_tuner.engine import trial
  from keras_tuner.tuners import gridsearch
label_desc: Use image node_id 22 for calling a global function with example usage: test_oracle_reload_ongoing_trials_to_retry(tmp_path) without return types