code: def test_attributes_results_7():
      def objective_function(opt):
          score = -opt["x1"] * opt["x1"]
          return score
  
      search_space = {
          "x1": list(np.arange(0, 10, 1)),
      }
  
      hyper = Hyperactive()
      hyper.add_search(
          objective_function,
          search_space,
          n_iter=20,
      )
      hyper.run()
  
      search_data = hyper.search_data(objective_function)
      with pytest.raises(Exception) as e_info:
          search_data["eval_times"]
  
file_path: Hyperactive/tests/test_results.py
imports: import pytest
  import numpy
  import pandas
  from hyperactive import Hyperactive
label_desc: Use image node_id 9 for calling a global function with example usage: test_attributes_results_7() and returns: score