def METHOD_NAME(heap, item):
    assert_heap_type(heap)
    assert_item_type_consistent_with_heap_type(heap, item)
    def hq_heappushpop_impl(heap, item):
        if heap and heap[0] < item:
            item, heap[0] = heap[0], item
            _siftup(heap, 0)
        return item
    return hq_heappushpop_impl