Bug 3391

https://gist.github.com/swierol/472d2f149aa339124b74
Separate imports into 3 groups: Python standard library, 3rd-party dependencies and local packages. See: http://legacy.python.org/dev/peps/pep-0008/#imports