I built a compiler that rewrites Python into a model-facing representation