I hate the monstrosity that this has become, but when this gets executed, `self` is a `code.InteractiveConsole` and not actually and instance of this class so the only way to break it up is defining functions in local scope. If you've got a workaround I'm interested.