Maxheap variant of heappushpop. The combined action runs more efficiently than heappush_max() followed by a separate call to heappop_max().
heapq/heappushpop_max
heappushpop_max