code: def test_convert_to_metrics_with_dict_without_obj_key():
      with pytest.raises(ValueError, match="the specified objective"):
          tuner_utils.validate_trial_results(
              {"loss": 0.1},
              obj_module.Objective("val_loss", "min"),
              "func_name",
          )
  
file_path: keras-tuner/keras_tuner/engine/tuner_utils_test.py
imports: import os
  import numpy
  import pytest
  from keras_tuner.backend import keras
  from keras_tuner.engine import objective
  from keras_tuner.engine import tuner_utils
label_desc: Use image node_id 8 for calling a global function with example usage: test_convert_to_metrics_with_dict_without_obj_key() without return types