docs: 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