@on_trait_change('application.gui:started')
    def _on_application_gui_started(self, obj, trait_name, old, new):
        if trait_name != 'started' or not new:
            return
        app = self.application
        from mayavi.plugins.script import Script
        window = app.workbench.active_window
        # Set our script instance.
        self.script = window.get_service(Script)
        # Call self.run from the GUI thread.
        app.gui.invoke_later(self.run)
Test the |localtime, |utc, and |timezone filters on bad inputs.
dataset/ETHPy150Open enthought/mayavi/mayavi/plugins/app.py/Mayavi._on_application_gui_started--crossover with--dataset/ETHPy150Open django/django/tests/timezones/tests.py/TemplateTests.test_localtime_filters_do_not_raise_exceptions