It would be useful in some situations for the documentation writer to specify additional Python code to run immediately before and/or after the user's REPL code, for setup or teardown of other function/objects/imports that the user would need to make the example code run.
The API might be something like:
```py-pre
# setup code
from json import dump
```
```py
# User's code block
from pyscript import display, document
def opened_picker(*args):
display("You opened the color picker!")
```
```py-post
# teardown code
```
It would be useful in some situations for the documentation writer to specify additional Python code to run immediately before and/or after the user's REPL code, for setup or teardown of other function/objects/imports that the user would need to make the example code run.
The API might be something like: