def test(self, *args):
        """This method examines each argument in turn.  If one is more
        suitable than the worst in the heap, it displaces it and triggers
        some shuffling in the heap to bring the new worst item to the fore.
        """
        for x in args:
            if self.op(x, self.heap[0]):
                pos = 0
                while True:
                    child = 2 * pos + 1
                    if child >= self.length:
                        break
                    child += self.op(self.heap[child], self.heap[child + 1])
                    if not self.op(x, self.heap[child]):
                        break
                    self.heap[pos] = self.heap[child]
                    pos = child
                self.heap[pos] = x
This method examines each argument in turn.  If one is more
        suitable than the worst in the heap, it displaces it and triggers
        some shuffling in the heap to bring the new worst item to the fore.
        
recipes/Python/299058_winnowing_data_with_a_heap/recipe-299058.py