code: def clear(self):
          
  
          for _, waiter in self.waiters():
              if isinstance(waiter, asyncio.Future) and not waiter.done():
                  waiter.set_exception(asyncio.CancelledError())
  
          self._waiters = {}
docs: Clear all waiters.
  
          This method will remove any current scheduled waiter with an
          asyncio.CancelledError exception.