def get_sorted_edges(graph):
    """Given a graph object, return the list of edges but ensures that for each (u,v) in Edges(graph), we have u < v.

    :param graph (nx.graph) : The graph which will yield the edge list.

    :return edges (list(tuple(int)) : the edges of graph as a list(tuple()) such that for every tuple (u,v) in edges
    we have u < v.

    """
    edges = list(graph.edges())
    for index, edge in enumerate(edges):
        edges[index] = tuple(sorted(edge))
    return edges