private static Collection<PackagingNodeSource> getRootNodeSources(Collection<? extends PackagingNodeSource> nodeSources) {
    Set<PackagingNodeSource> result = new HashSet<>();
    collectRootNodeSources(nodeSources, result);
    return result;
  }
private static Collection<PackagingNodeSource> getRootNodeSources(Collection<? extends PackagingNodeSource> nodeSources)