def yield_events_to_keep(events_name_and_dict):
    """Only yield events we are interested in recording."""
    for name_and_dict in events_name_and_dict:
        if name_and_dict[0] in NAMES_OF_EVENTS_TO_KEEP:
            yield name_and_dict
Only yield events we are interested in recording.
nodezator/pygamesetup/services/record.py