# nodes that can be collapsed are those that have one child
# are in the same state as their parent, and are not in a suite
foreach my $key (keys %reversed_nodes) {
# nodes that can be collapsed are those that have one child
# are in the same state as their parent, and are not in a suite
foreach my $key (keys %reversed_nodes) {