def _holetoleaf(self, node):
        """Drive the empty cell at node to the leaf level. Return position"""
        limit = len(self)
        a = self._a
        kid = node * 2
        while kid < limit:
            if not a[kid] < a[kid + 1]:    # comparison
                kid += 1
            a[node] = a[kid]
            node = kid
            kid = node * 2
        if kid == limit:
            a[node] = a[kid]
            return kid
        return node
Drive the empty cell at node to the leaf level. Return position
recipes/Python/81693_Heapbased_priority_queue/recipe-81693.py