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