fix broken master regarding pep8 number of blank lines

@sarina seems like master is failing pep8 now. Here are the fixes. The problem was that the PR passed code quality tests on the diffs but the resultant merge had pep8 violations that were due to blank lines issues that were not picked up on the diff testing.