phylox.generators.heath.heath.suppress_degree_two_nodes

phylox.generators.heath.heath.suppress_degree_two_nodes(network)

Suppresses degree 2 (in-degree 1 out-degree 1) nodes of the network in place and returns the network. The length of the new edge is the sum of the lengths of the old two edges. If the bottom edge had a probability, then this probability is given to the new edge.