def METHOD_NAME(self):
    pop = self._pending_removals.pop
    discard = self.data.discard
    while True:
        try:
            item = pop()
        except IndexError:
            return
        discard(item)