code: def test_update_trial(tmp_path):
      def _test_update_trial():
          hps = keras_tuner.HyperParameters()
          hps.Int("a", 0, 10, default=5)
          oracle = randomsearch.RandomSearchOracle(
              objective=keras_tuner.Objective("score", "max"),
              max_trials=10,
              hyperparameters=hps,
          )
          oracle._set_project_dir(tmp_path, "untitled")
          tuner_id = os.environ["KERASTUNER_TUNER_ID"]
          if "chief" in tuner_id:
              oracle_chief.start_server(oracle)
          else:
              client = oracle_client.OracleClient(oracle)
              trial = client.create_trial(tuner_id)
              assert "score" not in trial.metrics.metrics
              trial_id = trial.trial_id
              client.update_trial(trial_id, {"score": 1}, step=2)
              updated_trial = client.get_trial(trial_id)
              assert updated_trial.metrics.get_history("score") == [
                  metrics_tracking.MetricObservation([1], step=2)
              ]
  
      mock_distribute.mock_distribute(_test_update_trial)
  
file_path: keras-tuner/keras_tuner/distribute/oracle_chief_test.py
imports: import os
  import keras_tuner
  from keras_tuner.distribute import oracle_chief
  from keras_tuner.distribute import oracle_client
  from keras_tuner.engine import metrics_tracking
  from keras_tuner.test_utils import mock_distribute
  from keras_tuner.tuners import randomsearch
label_desc: Use image node_id 4 for calling a global function with example usage: test_update_trial(tmp_path) without return types