@staticmethod<EOL><INDENT>def baltree(ntips, treeheight=<NUM_LIT:1.0>):<DEDENT>
<EOL>if ntips % <NUM_LIT:2>:<EOL><INDENT>raise ToytreeError("<STR_LIT>")<EOL><DEDENT>rtree = toytree.tree()<EOL>rtree.treenode.add_child(name="<STR_LIT:0>")<EOL>rtree.treenode.add_child(name="<STR_LIT:1>")<EOL>for i in range(<NUM_LIT:2>, ntips):<EOL><INDENT>node = return_small_clade(rtree.treenode)<EOL>node.add_child(name=node.name)<EOL>node.add_child(name=str(i))<EOL>node.name = None<EOL><DEDENT>idx = <NUM_LIT:0><EOL>for node in rtree.treenode.traverse("<STR_LIT>"):<EOL><INDENT>if node.is_leaf():<EOL><INDENT>node.name = str(idx)<EOL>idx += <NUM_LIT:1><EOL><DEDENT><DEDENT>tre = toytree.tree(rtree.write(tree_format=<NUM_LIT:9>))<EOL>tre = tre.mod.make_ultrametric()<EOL>self = tre.mod.node_scale_root_height(treeheight)<EOL>self._coords.update()<EOL>return self<EOL>
Returns a balanced tree topology.