code: public static RelationGraph from(@NonNull Collection<RelationEdge> edges) {
        RelationGraph gPrime = new RelationGraph();
        edges.forEach(e -> {
           if (!gPrime.containsVertex(e.getFirstVertex())) {
              gPrime.addVertex(e.getFirstVertex());
           }
           if (!gPrime.containsVertex(e.getSecondVertex())) {
              gPrime.addVertex(e.getSecondVertex());
           }
           gPrime.addEdge(e);
        });
        return gPrime;
     }
docs: Creates a RelationGraph from a collection of edges
  
  @param edges the edges
  @return the relation graph