[75075362] Cleanup: move 'import datetime' to top of file.
[75075362] A few tweaks for PEP8.