<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def remove_all_listeners(self, event=None):
 """Remove all listeners attached to ``event``. If ``event`` is ``None``, remove all listeners on all events. """

        if event is not None:
            self._events[event] = OrderedDict()
        else:
            self._events = defaultdict(OrderedDict)