<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_listener(registry, listener):
 """ Adds a listener in the registry, if it is not yet in :param registry: A registry (a list) :param listener: The listener to register :return: True if the listener has been added """

    if listener is None or listener in registry:
        return False

    registry.append(listener)
    return True