Sort all import lines.

Sort all import lines in Python codes in the following groups:
1. from __future__ import ...
2. stdlib imports
3. imports for third-party packages. (In particular, mox and mock).
4. "import (factory|instalog)_common", relative imports, imports in
   factory package.
5. imports from cros.factory.external, instalog.external.

BUG=b:73868308
TEST=make test

Change-Id: I606db7952deb37747f00fd542856aae4a693ebe0
Reviewed-on: https://chromium-review.googlesource.com/936350
Commit-Ready: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
diff --git a/py/tools/regcode.py b/py/tools/regcode.py
index 7066e05..d84997d 100755
--- a/py/tools/regcode.py
+++ b/py/tools/regcode.py
@@ -14,7 +14,7 @@
 import random
 import sys
 
-import factory_common  # pylint: disable=W0611
+import factory_common  # pylint: disable=unused-import
 from cros.factory.device import device_utils
 from cros.factory.hwid.v3 import hwid_utils
 from cros.factory.proto import reg_code_pb2