Fixing python snippets