I think this is a PEP8 violation. I see the logic, but I personally prefer it with some white space above to make it clear that it's not part of the function above, and of course sticking with PEP8 is nice.