def heapify(x):
 n = len(x)
 for i in reversed(xrange((n // 2))):
  _siftup(x, i)

def heapify ( x ) : n = len ( x ) for i in reversed ( xrange ( ( n // 2 ) ) ) : _siftup ( x , i )
transform list into a heap .