Python's doctest library allows classes, functions or modules to include runnable test code in their docstrings that can be accessed and evaluated programmatically. We should allow synthesis agents to exploit that as an additional source of feedback - they should be able to write docstrings that include doctests for the code they generate, and to run the doctests to see if their code works in the same way they might run the typechecker (#361).