code: public static IScope findRoot(IScope from) {
          IScope current = from;
          while (current.hasParent()) {
              current = current.getParent();
          }
          return current;
      }
docs: Finds root scope for specified scope object. Root scope is the top level scope among scope's parents.
  
  @param from
  Scope to find root for
  @return Root scope object