@staticmethod
  def FixUp(heap, i):
    while True:
      if i != 1 and heap[i] < heap[i/2]:
        Heap.Swap(heap, i, i/2)
        i /= 2 # FixUp(heap, i/2)
      else:
        break
Traverse up the heap, ensuring the invariant is maintained.
dataset/ETHPy150Open steveniemitz/scales/scales/loadbalancer/heap.py/Heap.FixUp