<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def input_validate_key_handle(key_handle, name='key_handle'):
 """ Input validation for key_handles. """

    if type(key_handle) is not int:
        try:
            return key_handle_to_int(key_handle)
        except pyhsm.exception.YHSM_Error:
            raise pyhsm.exception.YHSM_WrongInputType(name, int, type(key_handle))
    return key_handle