code: public static void saveGraph(DirectedGraph<Integer, DefaultEdge> graph, String location) throws IOException {
  		File file = new File(location);
  		file.createNewFile();
  		if (!file.canWrite()) {
  			throw new IOException("Cannot write to file " + location);
  		}
  		GraphSerialization.saveGraph(graph, file);
  	}
docs: Serializes the given {@link DirectedGraph} object to the given location.
  
  @param graph Must not be {@code null}.
  @param location Must not be {@code null} and a valid file path.
  @throws IOException Thrown if errors occurred on the IO level.