code: def test_int_sampling_arg():
      i = hp_module.Int("i", 0, 10, sampling="linear")
      i = hp_module.Int.from_config(i.get_config())
      assert i.sampling == "linear"
  
      with pytest.raises(ValueError, match="sampling must be one of"):
          hp_module.Int("j", 0, 10, sampling="invalid")
  
      with pytest.raises(
          ValueError,
          match="min_value 1 is greater than the max_value 0",
      ):
          hp_module.Int("k", 1, 0, sampling="linear")
  
      with pytest.raises(
          ValueError,
          match="min_value 1 is greater than the max_value 0",
      ):
          hp_module.Int("k", 1, 0, sampling="linear")
  
      with pytest.raises(
          ValueError,
          match="does not support negative values",
      ):
          hp_module.Int("k", -10, -1, sampling="log")
  
      with pytest.raises(
          ValueError,
          match="For HyperParameters.Int\(name='k'\), expected step > 1",
      ):
          hp_module.Int("k", 1, 10, step=1, sampling="log")
  
file_path: keras-tuner/keras_tuner/engine/hyperparameters/hp_types/int_hp_test.py
imports: import pytest
  from keras_tuner import protos
  from keras_tuner.engine import hyperparameters
  from keras_tuner.engine.hyperparameters import hp_types
label_desc: Use image node_id 1 for calling a global function with example usage: test_int_sampling_arg() without return types