Revert "Update document.py"

This reverts commit 89009b7ddf566bdb4f731d36437e28d09e30d038.