code: def test_int_and_float(tmp_path):
      class MyGridSearch(gridsearch.GridSearch):
          def run_trial(self, trial, *args, **kwargs):
              hp = trial.hyperparameters
              hp.Int("int", 1, 5)
              hp.Float("float", 1, 2)
              return random.random()
  
      tuner = MyGridSearch(directory=tmp_path)
      tuner.search()
      # int has 5 values, float sampled 10 values and 1 default value
      # 5 * (10 + 1)
      assert len(tuner.oracle.trials) == 55
  
file_path: keras-tuner/keras_tuner/tuners/gridsearch_test.py
imports: import random
  from keras_tuner.backend import keras
  from keras_tuner.engine import hypermodel
  from keras_tuner.engine import trial
  from keras_tuner.tuners import gridsearch
label_desc: Use image node_id 2 for calling a global function with example usage: test_int_and_float(tmp_path) and returns: random