'Make row order align with key order.'

def sort(self):

    i = 0
    for node in self.traverse():
        num_rows = len(node.data)
        node.data = [x for x in range(i, (i + num_rows))]
        i += num_rows
