<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 async def wait_for(self, event_type: Type[TWaitForEvent]) -> TWaitForEvent: # type: ignore """ Wait for a single instance of an event that matches the specified event type. """

        # mypy thinks we are missing a return statement but this seems fair to do
        async for event in self.stream(event_type, num_events=1):
            return event