modify the python snippets