code: def _check_int(val, arg):
      int_val = int(val)
      if int_val != val:
          raise ValueError(
              f"{arg} must be an int, Received: {str(val)} of type {type(val)}."
          )
      return int_val
  
file_path: keras-tuner/keras_tuner/engine/hyperparameters/hp_types/int_hp.py
imports: from keras_tuner import protos
  from keras_tuner.api_export import keras_tuner_export
  from keras_tuner.engine import conditions
  from keras_tuner.engine.hyperparameters import hp_utils
  from keras_tuner.engine.hyperparameters.hp_types import numerical
label_desc: Use image node_id 1 for calling a global function with example usage: _check_int(val, arg) and returns: int_val