Factor this into a `makeConvex` function that returns a graph, for clarity and so that the variables aren't duplicate declarations.