<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _connect_client(self):
 """ Wait for a client to connect to this pipe. """

        overlapped = OVERLAPPED()
        overlapped.hEvent = create_event()

        while True:
            success = windll.kernel32.ConnectNamedPipe(
                self.pipe_handle,
                byref(overlapped))

            if success:
                return

            last_error = windll.kernel32.GetLastError()
            if last_error == ERROR_IO_PENDING:
                yield From(wait_for_event(overlapped.hEvent))

                # XXX: Call GetOverlappedResult.
                return  # Connection succeeded.

            else:
                raise Exception('connect failed with error code' + str(last_error))