src/vs/workbench/api/common/extHostTreeViews.ts/ExtHostTreeViews/constructor
class ExtHostTreeViews:	constructor(
		private _proxy: MainThreadTreeViewsShape,
		private commands: ExtHostCommands,
		private logService: ILogService
	) {

		function isTreeViewConvertableItem(arg: any): boolean {
			return arg && arg.$treeViewId && (arg.$treeItemHandle || arg.$selectedTreeItems || arg.$focusedTreeItem);
		}
		commands.registerArgumentProcessor({
			processArgument: arg => {
				if (isTreeViewConvertableItem(arg)) {
					return this.convertArgument(arg);
				} else if (Array.isArray(arg) && (arg.length > 0)) {
					return arg.map(item => {
						if (isTreeViewConvertableItem(item)) {
							return this.convertArgument(item);
						}
						return item;
					});
				}
				return arg;
			}
		});
	}