for (const span_id of span_ids) {
                            if (intersects(spans[span_id], from, to)) {
                                let overlap = parent.overlaps.get(span_id) || NONE_OVERLAP;
                                overlap = (overlap == NONE_OVERLAP) ? ALL_OVERLAP : NONE_OVERLAP;
                                node.overlaps.set(span_id, overlap);
                            }
                        }

                        // Generate the child nodes.
                        gather_overla