def remove(self, predicate):
        """Remove and return the first items for which predicate is True,
        ignoring delay."""
        with self._lock:
            for i, (elem, t, delay) in enumerate(self._queue):
                if predicate(elem):
                    del self._queue[i]
                    return elem
        return None
Remove and return the first items for which predicate is True,
        ignoring delay.
src/watchdog/utils/delayed_queue.py