code: def test_objective_not_found_error(tmp_path):
      oracle = OracleStub(directory=tmp_path, objective="val_loss")
      trial = oracle.create_trial(tuner_id="a")
      with pytest.raises(ValueError, match="Objective value missing"):
          oracle.update_trial(
              trial_id=trial.trial_id, metrics={"unknown": 0.5}
          )
  
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 3 for calling a global function with example usage: test_objective_not_found_error(tmp_path) without return types