human
Complete the below
def add_event_listener(event):

    ''''Used to register method for events.
    Arguments needs to match parameter of event.
    :param event: Name of event or list of them.'
    '''
 ... Give me a the Python code you requested?
assistant
#Here is the Python code you requested.
    class klass(object, ):
        def __new__(cls, func, *args, **kwargs):
            for ev in to_list(event, []):
                ADDONMANAGER.add_event_listener(class_name(func.__module__), func.__name__, ev)
            return func
    return klass