<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def runAndWait(self):
 """ Runs an event loop until all commands queued up until this method call complete. Blocks during the event loop and returns when the queue is cleared. @raise RuntimeError: When the loop is already running """

        if self._inLoop:
            raise RuntimeError('run loop already started')
        self._inLoop = True
        self._driverLoop = True
        self.proxy.runAndWait()