The minimal example below is run once from a Jupyter Notebook containing only 1 cell.
Problem 1: When run as is, the code typically produces a gui. When