def read_network_file(filename):
    """
    Load a file that contains a list of edges describing a particular network.
    Assumes the file has one edge per line, formatted as two node indices; "0 1" is an edge from 0 to 1
    :param filename: path+name of the file
    :return: List of edges that can be used to construct an nx.DiGraph
    """
    file = open(filename, "r")
    edges = []
    for line in file.readlines():
        line = line.replace("\t", " ").rstrip()
        nodes = line.split(" ")
        edges.append(tuple([int(node) for node in nodes]))

    return edges