def V(G):
    """
    Returns a set of verticies on a graph
    
    Parameters
    ----------
    G = A networkx graph.

    Returns
    -------
    set of vertices belonging to graph 'G'
    """
    return set(G.nodes())