human
Complete this python program:
def _test_module_properties(_module=None):
assistant
#Here is the Python code you requested.

    """Test application module
    """
    if (_module is None):
        app = use_app()
        _module = app.backend_module
    module_fname = _module.__name__.split('.')[(-1)]
    if (module_fname not in ('_egl', '_osmesa')):
        keymap = _module.KEYMAP
        vispy_keys = keymap.values()
        for keyname in dir(keys):
            if (keyname.upper() != keyname):
                continue
            key = getattr(keys, keyname)
            assert_in(key, vispy_keys)
    alt_modname = ''
    if (module_fname in ('_pyside', '_pyqt4', '_pyqt5')):
        alt_modname = (_module.__name__.rsplit('.', 1)[0] + '._qt')
    exceptions = ('_vispy_get_native_canvas', '_vispy_get_native_timer', '_vispy_get_native_app', '_vispy_reuse', '_vispy_mouse_move', '_vispy_mouse_press', '_vispy_mouse_release', '_vispy_mouse_double_click', '_vispy_detect_double_click', '_vispy_get_geometry', '_vispy_get_physical_size', '_vispy_sleep', '_process_backend_kwargs')
    class KlassRef(vispy.app.base.BaseCanvasBackend, ):
        def __init__(self, *args, **kwargs):
            pass
    Klass = _module.CanvasBackend
    base = KlassRef()
    for key in dir(KlassRef):
        if (not key.startswith('__')):
            method = getattr(Klass, key)
            if (key not in exceptions):
                print key
                args = ([None] * (len(getargspec(method).args) - 1))
                assert_raises(NotImplementedError, getattr(base, key), *args)
                if hasattr(method, '__module__'):
                    mod_str = method.__module__
                else:
                    mod_str = method.im_func.__module__
                assert_in(mod_str, (_module.__name__, alt_modname), ('Method    %s.%s    not    defined    in    %s' % (Klass, key, _module.__name__)))
    Klass = _module.TimerBackend
    KlassRef = vispy.app.timer.TimerBackend
    for key in dir(KlassRef):
        if (not key.startswith('__')):
            method = getattr(Klass, key)
            if (key not in exceptions):
                if hasattr(method, '__module__'):
                  ...