Produces an error if not all latent nodes are sources.
validateLatentNodesAreSources(graph)
graph
the LatentDigraph