Standardize imports

Refactor imports to follow pep8 guidelines of standard library, related
third party and local library order for imports.

Change-Id: Ied624c088c110c56f6e471a1441db0f8d6adae3c