Rendering Neo4j graph with Graphviz in Java

How do you visualize Neo4j graph with Graphviz and Java in 2024?
There is an example in neo4j-documentation repo, basically it works, but org.neo4j.visualization classes are in this neo4j-doc repo, and you have to copy-paste them into your app in order to use them.
Also I have found a mvnrepository artifact, but it hasn't been updated since 2017 and I was able to use it only with Java 8 and neo4j 3.1.1.
Is it possible to use lastest Neo4j version with org.neo4j.visualization.graphviz.GraphvizWriter class just by adding a dependency to pom.xml? Or copy-pasting classes from neo4j-documentation repo is the only way?