def pop():
        'Remove and return the lowest priority task. Raise KeyError if empty.'
        while pq:
            priority, count, task = heappop(pq)
            if task is not REMOVED:
                del entry_finder[task]
                return task
        raise KeyError('pop from an empty priority queue')
Remove and return the lowest priority task. Raise KeyError if empty.
recipes/Python/578091_Simple_tool_simulating_classes_using_closures/recipe-578091.py