def METHOD_NAME(lists):
    pq = []
    heapq.heapify(pq)
    # Push the heads of all lists into the priority queue
    for lst in lists:
        if lst:
            heapq.heappush(pq, CompareNode(lst))
    dummy = ListNode(0)
    tail = dummy
    # Start merging the lists
    while pq:
        node = heapq.heappop(pq).node
        tail.next = node
        tail = tail.next
        if node.next:
            heapq.heappush(pq, CompareNode(node.next))
    return dummy.next