Reformat xml_importer.py to be more readable

Readability counts.

Reviewers: @cahrens @dmitchell