<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def clear(self):
 """Clear all waiters. This method will remove any current scheduled waiter with an asyncio.CancelledError exception. """


        for _, waiter in self.waiters():
            if isinstance(waiter, asyncio.Future) and not waiter.done():
                waiter.set_exception(asyncio.CancelledError())

        self._waiters = {}