code: def filter_events(cls, client, event_data):
          
  
          for event in cls.events:
              # try event filters
              if event.matches(client, event_data):
                  yield event
docs: Filter registered events and yield them.