code: def dispatch(self, event: Any) -> None:
          
          if event.type:
              getattr(self, "ev_%s" % (event.type.lower(),))(event)
docs: Send an event to an `ev_*` method.
  
          `*` will be the events type converted to lower-case.
  
          If `event.type` is an empty string or None then it will be ignored.