def METHOD_NAME(self, system=True, display=True):
    import ctypes
    set = ctypes.windll.kernel32.SetThreadExecutionState
    if system:
        if display:
            set(Kernel32.ES_CONTINUOUS)
        else:
            set(Kernel32.ES_CONTINUOUS | Kernel32.ES_DISPLAY_REQUIRED)
    else:
        if display:
            set(Kernel32.ES_CONTINUOUS | Kernel32.ES_SYSTEM_REQUIRED)
        else:
            set(
                Kernel32.ES_CONTINUOUS
                | Kernel32.ES_SYSTEM_REQUIRED
                | Kernel32.ES_DISPLAY_REQUIRED
            )