src/vs/base/browser/ui/tree/compressedObjectTreeModel.ts/CompressedObjectTreeModel/_setChildren
class CompressedObjectTreeModel:	private _setChildren(
		node: ICompressedTreeNode<T> | null,
		children: Iterable<ITreeElement<ICompressedTreeNode<T>>>,
		options: IIndexTreeModelSpliceOptions<ICompressedTreeNode<T>, TFilterData>,
	): void {
		const insertedElements = new Set<T | null>();
		const onDidCreateNode = (node: ITreeNode<ICompressedTreeNode<T>, TFilterData>) => {
			for (const element of node.element.elements) {
				insertedElements.add(element);
				this.nodes.set(element, node.element);
			}
		};

		const onDidDeleteNode = (node: ITreeNode<ICompressedTreeNode<T>, TFilterData>) => {
			for (const element of node.element.elements) {
				if (!insertedElements.has(element)) {
					this.nodes.delete(element);
				}
			}
		};

		this.model.setChildren(node, children, { ...options, onDidCreateNode, onDidDeleteNode });
	}