code: def notify(self, n: int = 1) -> None:
          
          waiters = []  # Waiters we plan to run right now.
          while n and self._waiters:
              waiter = self._waiters.popleft()
              if not waiter.done():  # Might have timed out.
                  n -= 1
                  waiters.append(waiter)
  
          for waiter in waiters:
              future_set_result_unless_cancelled(waiter, True)
docs: Wake ``n`` waiters.