convert examples to doctests
🚀 Feature
Converting examples to doctests...
Motivation
The examples now are static so there is no guarantee that they are still valid...
Advantages of converting to doctest would:

increase reproducibility
each example can run as a stand-alone
make testing on smaller units
smaller test units simplify debugging

Additional context

https://docs.python.org/3/library/doctest.html
https://thomas-cokelaer.info/tutorials/sphinx/doctest.html
https://stackoverflow.com/questions/361675/python-doctest-vs-unittest