Fix PEP8 E3 issues (too few or too many blank lines).
Fix PEP8 W293 (blank line contains whitespace).
Fix PEP8 E502 (the backslash is redundant between brackets).