import networkx


def create_subnet(edges):
    """
    Create a subnetwork from an edge list
    """
    subnet = networkx.MultiGraph()

    for edge in edges:
        subnet.add_edge(edge.start_node, edge.end_node, edge.key)

    return subnet