def _signal_dependent_done(self, fut):
    if not fut.done():
      raise RuntimeError('Future not done before signalling dependant done.')
    self._dependents.remove(fut)
    exc = fut.get_exception()
    tb = fut.get_traceback()
    val = None
    if exc is None:
      val = fut.get_result()
    if self._waiting:
      waiter = self._waiting.popleft()
      self._pass_result(waiter, exc, tb, val)
    else:
      self._completed.append((exc, tb, val))
    if self._full or not self._dependents and not self._done:
      self.set_result(None)
      self._mark_finished()
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/ext/ndb/tasklets.py/QueueFuture._signal_dependent_done/operator `and` -> `or`