code: def test_template():
      """Test application module template"""
      _test_module_properties(_template)
      assert_raises(NotImplementedError, _template._set_config, dict())
      a = _template.ApplicationBackend()
      print(a._vispy_get_backend_name())
      for method in (
          a._vispy_process_events,
          a._vispy_run,
          a._vispy_quit,
          a._vispy_get_native_app,
      ):
          assert_raises(NotImplementedError, method)
  
      class TemplateCanvasBackend(_template.CanvasBackend):
          def __init__(self, *args, **kwargs):
              pass  # Do not call the base class, since it will check for Canvas
  
      c = TemplateCanvasBackend()  # _template.CanvasBackend(None)
      print(c._vispy_get_native_canvas())
      for method in (
          c._vispy_set_current,
          c._vispy_swap_buffers,
          c._vispy_close,
          c._vispy_update,
          c._vispy_get_size,
          c._vispy_get_position,
      ):
          assert_raises(NotImplementedError, method)
      for method in (c._vispy_set_title, c._vispy_set_visible):
          assert_raises(NotImplementedError, method, 0)
      for method in (c._vispy_set_size, c._vispy_set_position):
          assert_raises(NotImplementedError, method, 0, 0)
  
file_path: vispy/vispy/app/tests/test_backends.py
imports: import vispy
  from vispy import keys
  from vispy.testing import requires_application, assert_in, run_tests_if_main, assert_raises
  from vispy.app import use_app, Application
  from vispy.app.backends import _template
  from vispy.util import _get_args
label_desc: Use image node_id 2 for calling a global function with example usage: test_template() without return types