code: def remove_all_listeners(self, event=None):
          
          if event is not None:
              self._registered_events[event] = OrderedDict()
          else:
              self._registered_events = defaultdict(OrderedDict)
docs: Remove all functions for all events, or one event if one is specifed.
  
          :param event: Optional event you wish to remove all functions from