Replace comments in `codegen` with docstrings.