def get_unstarted_events(mongodb):
    """
    get events that have not been started yet.
    generator sets started to True before returning an event

    Parameters
    ----------
    mongodb : pymongo.Database
        A MongoDB database object
    """
    go_on = True
    while go_on:
        event = mongodb['list'].find_one({'started': False})
        if event is None:
            go_on = False
        else:
            event['started'] = True
            mongodb['list'].save(event)
            yield event
