580
580
if not left_subtree_pushed_stack[-1]:
581
581
# recurse depth first into the primary parent
582
582
next_node_name = pending_parents_stack[-1].pop(0)
584
586
# place any merges in right-to-left order for scheduling
585
587
# which gives us left-to-right order after we reverse