class DefaultNode extends AbstractNode {

    protected final @Nonnull InternalSession session;
    protected final @Nonnull org.eclipse.aether.graph.DependencyNode node;
    protected final boolean verbose;

    public DefaultNode(
            @Nonnull InternalSession session, @Nonnull org.eclipse.aether.graph.DependencyNode node, boolean verbose) {
        this.session = session;
        this.node = node;
        this.verbose = verbose;
    }

    @Override
    DependencyNode getDependencyNode() {
        return node;
    }

    @Override
    public Artifact getArtifact() {
        return node.getArtifact() != null ? session.getArtifact(node.getArtifact()) : null;
    }

    @Override
    public Dependency getDependency() {
        return node.getDependency() != null ? session.getDependency(node.getDependency()) : null;
    }

    @Override
    public List<Node> getChildren() {
        return new MappedList<>(node.getChildren(), n -> session.getNode(n, verbose));
    }

    @Override
    public List<RemoteRepository> getRemoteRepositories() {
        return new MappedList<>(node.getRepositories(), session::getRemoteRepository);
    }

    @Override
    public Optional<RemoteRepository> getRepository() {
        // TODO: v4: implement
        throw new UnsupportedOperationException("Not implemented yet");
    }

    @Override
    public String asString() {<FILL_FUNCTION_BODY>}

    private static void join(StringBuilder buffer, List<String> details, String separator) {
        boolean first = true;
        for (String detail : details) {
            if (first) {
                first = false;
            } else {
                buffer.append(separator);
            }
            buffer.append(detail);
        }
    }
}

        String nodeString = super.asString();

        if (!verbose) {
            return nodeString;
        }

        org.eclipse.aether.graph.DependencyNode node = getDependencyNode();

        List<String> details = new ArrayList<>();

        org.eclipse.aether.graph.DependencyNode winner =
                (org.eclipse.aether.graph.DependencyNode) node.getData().get(ConflictResolver.NODE_DATA_WINNER);
        String winnerVersion = winner != null ? winner.getArtifact().getBaseVersion() : null;
        boolean included = (winnerVersion == null);

        String preManagedVersion = DependencyManagerUtils.getPremanagedVersion(node);
        if (preManagedVersion != null) {
            details.add("version managed from " + preManagedVersion);
        }

        String preManagedScope = DependencyManagerUtils.getPremanagedScope(node);
        if (preManagedScope != null) {
            details.add("scope managed from " + preManagedScope);
        }

        String originalScope = (String) node.getData().get(ConflictResolver.NODE_DATA_ORIGINAL_SCOPE);
        if (originalScope != null && !originalScope.equals(node.getDependency().getScope())) {
            details.add("scope updated from " + originalScope);
        }

        if (!included) {
            if (Objects.equals(winnerVersion, node.getArtifact().getVersion())) {
                details.add("omitted for duplicate");
            } else {
                details.add("omitted for conflict with " + winnerVersion);
            }
        }

        StringBuilder buffer = new StringBuilder();
        if (included) {
            buffer.append(nodeString);
            if (!details.isEmpty()) {
                buffer.append(" (");
                join(buffer, details, "; ");
                buffer.append(")");
            }
        } else {
            buffer.append("(");
            buffer.append(nodeString);
            if (!details.isEmpty()) {
                buffer.append(" - ");
                join(buffer, details, "; ");
            }
            buffer.append(")");
        }
        return buffer.toString();
    
<methods>public non-sealed void <init>() ,public boolean accept(org.apache.maven.api.NodeVisitor) ,public java.lang.String asString() ,public org.apache.maven.api.Node filter(Predicate<org.apache.maven.api.Node>) ,public java.lang.String toString() <variables>