private IdentityHashMap<Annotation, Integer> getAnnotations(List<Annotation> annotationsToCopy) {
        IdentityHashMap<Annotation, Integer> map = new IdentityHashMap<>();
        for (int i = 0; i < annotationsToCopy.size(); i++) {
            map.put(annotationsToCopy.get(i), i);
        }
        return map;
    }
Creates a new SpanTree with the given name and an empty SpanList as its root node.

@param name the name of the span tree
document/src/main/java/com/yahoo/document/annotation/SpanTree.java