code: public static <V> void removeVertices(DirectedGraph<V, DefaultEdge> graph, Set<V> vertices) {
          for (V vertex : vertices) {
              if (graph.containsVertex(vertex)) {
                  graph.removeVertex(vertex);
              }
          }
      }
docs: Removes vertices from graph
  @param graph raph to mutate
  @param vertices vertices to remove