I have a list stored in this format: [int, (int, int), ...]
My code looks like this for the first case.
heap.heappush(list_, (a, b)) # b is a t