Annotated code in ex.py, schemas on GitHub.