human
Complete the below
def event(name, priority=128):

    ''''Register event to function with a decorator'
    '''

=====
Give me a the Python code you requested?
assistant
#Here is the Python code you requested.
    def decorator(func):
        add_event_handler(name, func, priority)
        return func
    return decorator