def METHOD_NAME(self, kind):
    with self.event_loop_until_condition(lambda: self.closed):
        self.gui.invoke_later(
            toolkit().view_application,
            context=self.model,
            view=simple_view,
            kind=kind,
            handler=self.handler,
        )
        self.gui.invoke_after(100, self.close_dialog)