code: def test_float():
      # Test with step arg
      linear = hp_module.Float(
          "linear", min_value=0.5, max_value=9.5, step=0.1, default=9.0
      )
      linear = hp_module.Float.from_config(linear.get_config())
      assert linear.default == 9.0
      assert 0.5 <= linear.random_sample() <= 9.5
      assert isinstance(linear.random_sample(), float)
      assert linear.random_sample(123) == linear.random_sample(123)
  
      # Test without step arg
      linear = hp_module.Float(
          "linear", min_value=0.5, max_value=6.5, default=2.0
      )
      linear = hp_module.Float.from_config(linear.get_config())
      assert linear.default == 2.0
      assert 0.5 <= linear.random_sample() < 6.5
      assert isinstance(linear.random_sample(), float)
      assert linear.random_sample(123) == linear.random_sample(123)
  
      # No default
      linear = hp_module.Float(
          "linear", min_value=0.5, max_value=9.5, step=0.1
      )
      assert linear.default == 0.5
  
file_path: keras-tuner/keras_tuner/engine/hyperparameters/hp_types/float_hp_test.py
imports: import numpy
  from keras_tuner import protos
  from keras_tuner.engine import hyperparameters
label_desc: Use image node_id 1 for calling a global function with example usage: test_float() without return types