def event_callback(key):
    def decorator(func):
        func.event_key = key
        return func
    return decorator
Decorator for defining a event callback method. Adds a property attribute "event_key" with value as the passed key.
dataset/ETHPy150Open ARMmbed/htrun/mbed_host_tests/host_tests/base_host_test.py/event_callback