def _heapify_max(x):
 n = len(x)
 for i in reversed(range((n // 2))):
  _siftup_max(x, i)

def _heapify_max ( x ) : n = len ( x ) for i in reversed ( range ( ( n // 2 ) ) ) : _siftup_max ( x , i )
transform list into a maxheap .