def compare(self, node, prev_value=None, prev_index=None):
if prev_value is not None and node.value != prev_value orprev_index is not None and node.index != prev_index:<EOL><INDENT>raise TestFailed(index=self.index)<EOL><DEDENT>
Raises :exc:`TestFailed` if the node is not matched with
        `prev_value` or `prev_index`.