private static @NotNull DependencyNode buildUnresolvedDependencyNode(
    @NotNull UnresolvedDependencyResult dependency,
    @NotNull Map<Object, DependencyNode> added,
    @NotNull IdGenerator idGenerator
  ) {
    ComponentSelector attempted = dependency.getAttempted();

    long id = idGenerator.getId(attempted);
    if (added.containsKey(id)) {
      return new ReferenceNode(id);
    }

    UnknownDependencyNode node = new UnknownDependencyNode(id, attempted.getDisplayName());
    node.setResolutionState(ResolutionState.UNRESOLVED);

    added.put(id, node);

    return node;
  }
private static @NotNull DependencyNode buildUnresolvedDependencyNode(
    @NotNull UnresolvedDependencyResult dependency,
    @NotNull Map<Object, DependencyNode> added,
    @NotNull IdGenerator idGenerator
  )