@colinios may have intended for this line to be an elif
header rather than an else
header:
else to_stack.get_size() == 0 or from_stack.peek() < to_stack.peek():
If that is so, then the colon can stay at the end where it is, but else
needs to be changed to elif
.