The community asked us to remove the dependency on a PyPI
library with a proprietary license. This commit does that
while preserving some minor refactoring that was done at the
same time.
Reverts commit ca6168d01b.
Closes-Bug: #1499334
Change-Id: I1a4b1b2b2151bb222ae5c77b9b317e7505255067