code: def test_objective_to_str():
      obj = objective.Objective(name="accuracy", direction="min")
      assert str(obj) == 'Objective(name="accuracy", direction="min")'
  
imports: import pytest
  import keras_tuner
  from keras_tuner.engine import objective
label_desc: Use image node_id 16 for calling a global function with example usage: test_objective_to_str() without return types