fixing python snippets