Fix unused imports(flake8 F401, F999)

- F401: imported but unused
- F999: syntax error in doctest

Fixing a couple of the F401's simply required fixing the doctests syntax
where the imports were actually in use.

Change-Id: If78abbb143daf8d005a71c5ab52836df29c5e0cd
Merge "Fix unused imports(flake8 F401, F999)"