Moved all the imports to the top.

Use the methods on the AST object instead of module-level functions;
these have been implemented for a couple of versions now, and are
already used in the module documentation in preference to the
functions.
1 file changed