code: def notify(self, n=1):
          
          if not is_locked(self._lock):
              raise RuntimeError('lock is not locked')
          notified = [0]  # Work around lack of "nonlocal" in py27
          def walker(switcher, predicate):
              if not switcher.active:
                  return False  # not not keep switcher that timed out
              if predicate and not predicate():
                  return True
              if n >= 0 and notified[0] >= n:
                  return True
              switcher.switch()
              notified[0] += 1
              return False  # only notify once
          walk_callbacks(self, walker)
docs: Raise the condition and wake up fibers waiting on it.
  
          The optional *n* parameter specifies how many fibers will be notified.
          By default, one fiber is notified.