code: function determineContext( scope ) {
     let current = scope;
     while( !current.hasOwnProperty( 'widget' ) && current !== current.$root ) {
        current = current.$parent;
     }
  
     const isInWidget = !!current.widget;
  
     return {
        widgetName: isInWidget ? current.widget.path : '',
        widgetId: isInWidget ? current.widget.id : '',
        widgetScopeId: isInWidget ? current.$id : null,
        scopeId: scope.$id
     };
  }
docs: ///////////////////////////////////////////////////////////////////////////////////////////////////////////