def simple_dict_event_extractor(row, condition_for_creating_event, id_field, timestamp_field, name_of_event):
    """
    Takes a row of the data df and returns an event record {id, event, timestamp}
    if the row satisfies the condition (i.e. condition_for_creating_event(row) returns True)
    """
    if condition_for_creating_event(row):
        return {'id': row[id_field], 'event': name_of_event, 'timestamp': row[timestamp_field]}