[ASDL refactor] Move Python snippets into gen_python.py