PEP8 – import not at top of file with sys.path

Problem PEP8 has a rule about putting imports at the top of a file: Imports are always put at the top of the file, just after any module comments and docstrings, and before module globals and