<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _check_bool(result, func, args):
 # pylint: disable=unused-argument """ Used as an error handler for Windows calls Gets last error if call is not successful """


    if not result:
        raise ctypes.WinError(ctypes.get_last_error())
    return args