def _traverse_inorder(self):
    'Conducts an inorder traversal of the merge tree.\n\n        The inorder traversal returns the nodes on the last level in the order\n        they should be drawn so that no edges cross each other.\n\n        @return: the result of the inorder traversal in a list.'
    result = []
    seen_nodes = set()
    for node_index in reversed(xrange((self._nitems + self._nmerges))):
        if (node_index in seen_nodes):
            continue
        stack = [node_index]
        while stack:
            last = stack.pop()
            seen_nodes.add(last)
            if (last < self._nitems):
                result.append(last)
            else:
                stack.extend(self._merges[(last - self._nitems)])
    return result
Conducts an inorder traversal of the merge tree.

The inorder traversal returns the nodes on the last level in the order
they should be drawn so that no edges cross each other.

@return: the result of the inorder traversal in a list.
def _traverse_inorder(self):
    'Conducts an inorder traversal of the merge tree.\n\n        The inorder traversal returns the nodes on the last level in the order\n        they should be drawn so that no edges cross each other.\n\n        @return: the result of the inorder traversal in a list.'
    result = []
    seen_nodes = set()
    for node_index in reversed(xrange((self._nitems + self._nmerges))):
        if (node_index in seen_nodes):
            continue
        stack = [node_index]
        while stack:
            last = stack.pop()
            seen_nodes.add(last)
            if (last < self._nitems):
                result.append(last)
            else:
                stack.extend(self._merges[(last - self._nitems)])
    return result