src/vs/workbench/contrib/notebook/browser/view/notebookCellList.ts/getEditorAttachedPromise
function getEditorAttachedPromise(element: CellViewModel) {
	return new Promise<void>((resolve, reject) => {
		Event.once(element.onDidChangeEditorAttachState)(() => element.editorAttached ? resolve() : reject());
	});
}