def remove_listener(self, func, name=None):
name = func.__name__ if name is None else name<EOL>if name in self.extra_events:<EOL><INDENT>try:<EOL><INDENT>self.extra_events[name].remove(func)<EOL><DEDENT>except ValueError:<EOL><INDENT>pass<EOL><DEDENT><DEDENT>
Removes a listener from the pool of listeners.

        Parameters
        -----------
        func
            The function that was used as a listener to remove.
        name: :class:`str`
            The name of the event we want to remove. Defaults to
            ``func.__name__``.