clean up python snippet
fix python indentation