src/vs/workbench/api/browser/mainThreadNotebookDocuments.ts/MainThreadNotebookDocuments/$tryCreateNotebook
class MainThreadNotebookDocuments:	async $tryCreateNotebook(options: { viewType: string; content?: NotebookDataDto }): Promise<UriComponents> {
		const ref = await this._notebookEditorModelResolverService.resolve({ untitledResource: undefined }, options.viewType);

		// untitled notebooks are disposed when they get saved. we should not hold a reference
		// to such a disposed notebook and therefore dispose the reference as well
		ref.object.notebook.onWillDispose(() => {
			ref.dispose();
		});

		// untitled notebooks are dirty by default
		this._proxy.$acceptDirtyStateChanged(ref.object.resource, true);

		// apply content changes... slightly HACKY -> this triggers a change event
		if (options.content) {
			const data = NotebookDto.fromNotebookDataDto(options.content);
			ref.object.notebook.reset(data.cells, data.metadata, ref.object.notebook.transientOptions);
		}
		return ref.object.resource;
	}