def METHOD_NAME(eventsSym, event):
    events = eventsSym.getValue()
    if event['value'] == True:
        if event['id'] not in events:
            events = events +" "+ event['id']
    else:
        if event['id'] in events:
            events.replace(event['id'],"",)
    eventsSym.setValue(events,0)