docs: private static Set<DependencyDescriptor> getDependenciesTransitively(String scope, ResolvedDependency parent) {
          Stack<ResolvedDependency> stack = new Stack<>();
          stack.push(parent);
          Set<DependencyDescriptor> dependencies = new HashSet<>();
          while (!stack.empty()) {
              ResolvedDependency rd = stack.pop();
              // Skip the parent's artifacts.
              if (rd != parent) {
                  rd.getModuleArtifacts().forEach(a -> dependencies.add(asDescriptor(scope, a)));
              }
              rd.getChildren().forEach(d -> {
                  if (!stack.contains(d)) {
                      stack.add(d);
                  }
              });
          }
          return dependencies;
      }