static Set getCurrentScopeUltimateRuntimeIteratorsIfAny(CompiledValue compiledValue,
      ExecutionContext context) {
    Set set = new HashSet();
    context.computeUltimateDependencies(compiledValue, set);
    Iterator iter = set.iterator();
    while (iter.hasNext()) {
      RuntimeIterator rIter = (RuntimeIterator) iter.next();
      if (rIter.getScopeID() != context.currentScope().getScopeID()/* context.getScopeCount() */) {
        iter.remove();
      }
    }
    return set;
  }
This function returns the ultimate independent RuntimeIterators of current scope on which the
CompiledValue passed is dependent upon. This does not return the RuntimeIterators on which it
may be dependent but are not part of the current scope. If no such RuntimeIterator exists it
returns empty set.

@param compiledValue CompiledValue Object
@param context ExecutionContextobject
@return Set containing the ultimate independent RuntimeIterators of current scope
geode-core/src/main/java/org/apache/geode/cache/query/internal/QueryUtils.java