updateNode method
Replaces all annotations for nodeId with annotations.
Implementation
void updateNode(String nodeId, List<SpellAnnotation> annotations) {
if (annotations.isEmpty) {
_annotations.remove(nodeId);
} else {
_annotations[nodeId] = annotations;
}
}