code: def test_choice():
      choice = hp_module.Choice("choice", [1, 2, 3], default=2)
      choice = hp_module.Choice.from_config(choice.get_config())
      assert choice.default == 2
      assert choice.random_sample() in [1, 2, 3]
      assert choice.random_sample(123) == choice.random_sample(123)
      assert abs(choice.value_to_prob(1) - 1.0 / 6) < 1e-4
      # No default
      choice = hp_module.Choice("choice", [1, 2, 3])
      assert choice.default == 1
      with pytest.raises(ValueError, match="default value should be"):
          hp_module.Choice("choice", [1, 2, 3], default=4)
  
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 1 for calling a global function with example usage: test_choice() without return types