code: def test_choice_proto():
      hp = hp_module.Choice("a", [2.3, 4.5, 6.3], ordered=True)
      proto = hp.to_proto()
      assert proto.name == "a"
      assert proto.ordered
      assert np.allclose(
          [v.float_value for v in proto.values], [2.3, 4.5, 6.3]
      )
      # Proto stores the implicit default.
      assert np.isclose(proto.default.float_value, 2.3)
  
      new_hp = hp_module.Choice.from_proto(proto)
      assert new_hp.name == "a"
      assert np.allclose(new_hp.values, hp.values)
      assert new_hp.ordered
      assert np.isclose(new_hp._default, 2.3)
  
      # Test int values.
      int_choice = hp_module.Choice(
          "b", [1, 2, 3], ordered=False, default=2
      )
      new_int_choice = hp_module.Choice.from_proto(
          int_choice.to_proto()
      )
      assert int_choice.get_config() == new_int_choice.get_config()
  
      # Test float values.
      float_choice = hp_module.Choice(
          "b", [0.5, 2.5, 4.0], ordered=False, default=2.5
      )
      new_float_choice = hp_module.Choice.from_proto(
          float_choice.to_proto()
      )
      assert float_choice.get_config() == new_float_choice.get_config()
  
file_path: keras-tuner/keras_tuner/engine/hyperparameters/hp_types/choice_hp_test.py
imports: import numpy
  import pytest
  from keras_tuner.engine import hyperparameters
label_desc: Use image node_id 9 for calling a global function with example usage: test_choice_proto() without return types