The latest version of sphinx-exercise supports code through the use of gated directives
https://ebp-sphinx-exercise.readthedocs.io/en/latest/syntax.html#alternative-gated-syntax
so we can now migrate the lecture series to use this package for nice looking exercise and solution admonitions.