Add pretty printing for _source_document field, improve code quality according to pylint