

def _turn(self):
    self._timer = None
    (events, self._events) = (self._events, [])
    for (cb, args, kwargs) in events:
        try:
            cb(*args, **kwargs)
        except:
            log.err()
    if (not self._events):
        (observers, self._flushObservers) = (self._flushObservers, [])
        for o in observers:
            o.callback(None)

dataset/ETHPy150Open warner/petmail/petmail/eventual.py _SimpleCallQueue._turn/original