Hi @bagjohn, sorry about the confusion! As Sharaf pointed out, those examples are designed for a normal Python environment, not the GUI environment. In most cases, examples exist in both places, but it's not always clear where to find them.
I wrote up this page in an effort to improve the documentation for how to run models in and out of the GUI. If you have any thoughts on ways to improve that page I would really appreciate it so that other people don't run into the same problem!