Modified to pass flake8 checks.