This filter's out continuous duplication of `'\n'` from the code, which exist due to use of multiple line-breaks in the Python example file. We could make this section more defensive by checking for duplication for only `'\n'`. What do you think?