Python implementation of the Min-Max Heap datastructure