<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def peek(self):
        u'''Check event queue.'''
        Cevent = INPUT_RECORD()
        count = DWORD(0)
        status = self.PeekConsoleInputW(self.hin, 
                                byref(Cevent), 1, byref(count))
        if status and count == 1:
            return event(self, Cevent)