def update_idxs(self):
<EOL>idx = self.ttree.nnodes - <NUM_LIT:1><EOL>for node in self.ttree.treenode.traverse("<STR_LIT>"):<EOL><INDENT>if not node.is_leaf():<EOL><INDENT>node.add_feature("<STR_LIT>", idx)<EOL>if not node.name:<EOL><INDENT>node.name = str(idx)<EOL><DEDENT>idx -= <NUM_LIT:1><EOL><DEDENT><DEDENT>for node in self.ttree.treenode.get_leaves():<EOL><INDENT>node.add_feature("<STR_LIT>", idx)<EOL>if not node.name:<EOL><INDENT>node.name = str(idx)<EOL><DEDENT>idx -= <NUM_LIT:1><EOL><DEDENT>
set root idx highest, tip idxs lowest ordered as ladderized