src/vs/workbench/contrib/notebook/browser/view/renderers/codeCell.ts/CodeCell/updateForCollapseState
class CodeCell:	private updateForCollapseState(): boolean {
		if (this.viewCell.metadata.outputCollapsed === this._renderedOutputCollapseState &&
			this.viewCell.metadata.inputCollapsed === this._renderedInputCollapseState) {
			return false;
		}

		this.viewCell.layoutChange({});

		if (this.viewCell.metadata.inputCollapsed && this.viewCell.metadata.outputCollapsed) {
			this.viewUpdateAllCollapsed();
		} else if (this.viewCell.metadata.inputCollapsed) {
			this.viewUpdateInputCollapsed();
		} else if (this.viewCell.metadata.outputCollapsed && this.viewCell.outputsViewModels.length) {
			this.viewUpdateOutputCollapsed();
		} else {
			this.viewUpdateExpanded();
		}

		this._renderedOutputCollapseState = this.viewCell.metadata.outputCollapsed;
		this._renderedInputCollapseState = this.viewCell.metadata.inputCollapsed;

		return true;
	}