function getOwnerStack(vnode) {
	const stack = [vnode];
	let next = vnode;
	while (next._owner != null) {
		stack.push(next._owner);
		next = next._owner;
	}

	return stack.reduce((acc, owner) => {
		acc += `  in ${getDisplayName(owner)}`;

		const source = owner.__source;
		if (source) {
			acc += ` (at ${source.fileName}:${source.lineNumber})`;
		} else if (showJsxSourcePluginWarning) {
			console.warn(
				'Add @babel/plugin-transform-react-jsx-source to get a more detailed component stack. Note that you should not add it to production builds of your App for bundle size reasons.'
			);
		}
		showJsxSourcePluginWarning = false;

		return (acc += '\n');
	}, '');
}
Return the component stack that was captured up to this point.
@param {import('./internal').VNode} vnode
@returns {string}