modify python snippets