def is_bifurcating(self, include_root=True):
ctn1 = -<NUM_LIT:1> + (<NUM_LIT:2> * len(self))<EOL>ctn2 = -<NUM_LIT:2> + (<NUM_LIT:2> * len(self))<EOL>if self.is_rooted():<EOL><INDENT>return bool(ctn1 == sum(<NUM_LIT:1> for i in self.treenode.traverse()))<EOL><DEDENT>if include_root:<EOL><INDENT>return bool(ctn2 == -<NUM_LIT:1> + sum(<NUM_LIT:1> for i in self.treenode.traverse()))<EOL><DEDENT>return bool(ctn2 == sum(<NUM_LIT:1> for i in self.treenode.traverse()))<EOL>
Returns False if there is a polytomy in the tree, including if the tree
is unrooted (basal polytomy), unless you use the include_root=False
argument.