code: def handle_event(self, event):
          
          # loop through the handlers associated with the event type.
          for h in self._events.get(event.type, []):
  
              # Iterate through the handler's dictionary of event parameters 
              for k, v in h.params.items():
                  # get the value of event.k, if none, return v
                  if not v(getattr(event, k, v)):
                      break
              else:
                  h.call_actions(event)
                  if self._logger is not None:
                      self._logger.debug("Handle event: {}.".format(event))
  
                  return True
  
          return False
docs: An abstract method that must be overwritten by child classes used to handle events.
  
          event - the event to be handled
  
          returns true or false if the event could be handled here
  
          default code is given for this method, however subclasses must still override this method to insure the subclass has the correct behavior.