def get_edge_vertex_ids(g, sort=True):
    """get_edge_vertex_ids
    Returns a list of tuples containing the source and target for each edge in
    the graph.

    Parameters
    ----------
        g : :obj:`graph_tool.Graph`
            A graph with edges.
        sorted : :obj:`bool`: 
            Determines whether the edges will be returned sorted in ascending 
            order or not. Defaults to True.

    Returns
    -------
        :obj:`list` 
            A list of source target pairs for every edge in the graph, with the 
            format, (source, target).
    """
    if sort:
        return sorted([(int(e.source()), int(e.target())) for e in g.edges()])
    else:
        return [(int(e.source()), int(e.target())) for e in g.edges()]