<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def drain_events(self, allowed_methods=None, timeout=None):
 """Wait for an event on any channel."""

        return self.wait_multi(self.channels.values(), timeout=timeout)