heapq module