topo-dpi: add document and fix pep8