code: def add_listener(registry, listener):
      
      if listener is None or listener in registry:
          return False
  
      registry.append(listener)
      return True
docs: 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