def split_edges(lower, upper, g):
    """Select the edges of the subgraph based on indices.

    Parameters
    ----------
    lower, upper: limits of calculation
    g: the original graph

    Returns
    -------
    the edges of the subgraph"""
    sub_edges = []
    for edge in g.edges:
        x, y, v = edge
        if lower <= min(x,y) and max(x,y) < upper:
            sub_edges.append(edge)
    return sub_edges