def input_validate_key_handle(key_handle, name='<STR_LIT>'):
if type(key_handle) is not int:<EOL><INDENT>try:<EOL><INDENT>return key_handle_to_int(key_handle)<EOL><DEDENT>except pyhsm.exception.YHSM_Error:<EOL><INDENT>raise pyhsm.exception.YHSM_WrongInputType(name, int, type(key_handle))<EOL><DEDENT><DEDENT>return key_handle<EOL>
Input validation for key_handles.