class Differentiator {

    public static PartialsOf reverseModeAutoDiff(Vertex ofVertex, Set<? extends Vertex> wrt) {
        if (ofVertex.isObserved()) {
            return new PartialsOf(ofVertex, Collections.emptyMap());
        } else {
            return reverseModeAutoDiff(ofVertex, Differentiable.ofSelfWrtSelf(ofVertex.getShape()), wrt);
        }
    }

}