python: Fix style issues
Fix style issues:
- 2 blank lines around functions and classes
- classes at the top of the module
- reformat to avoid long hard to read lines
- whitespace before ','
- whitespace after #
- unused imports
- unexpected indenation
- remove blank line at end of file
Signed-off-by: Nir Soffer <nsoffer@redhat.com>