<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def filter_events(cls, client, event_data):
 """Filter registered events and yield them."""


        for event in cls.events:
            # try event filters
            if event.matches(client, event_data):
                yield event