def replace_event_annotations(event, newanns):
    """Replace event annotations with the provided ones."""
    _humilis = event.get("_humilis", {})
    if not _humilis:
        event["_humilis"] = {"annotation": newanns}
    else:
        event["_humilis"]["annotation"] = newanns
def replace_event_annotations ( event , newanns ) : _humilis = event . get ( "_humilis" , { } ) if not _humilis : event [ "_humilis" ] = { "annotation" : newanns } else : event [ "_humilis" ] [ "annotation" ] = newanns
Replace event annotations with the provided ones.