import random


def split_test_from_training_data(network, ratio=0.1):
    """
    Splits a given network into two networks with disjoint edges randomly.
    """
    test_edges = random.sample(list(network.edges()), int(len(network.edges()) * ratio))
    training_network = network.copy()
    training_network.remove_edges_from(test_edges)
    test_network = network.copy()
    test_network.remove_edges_from(training_network.edges())
    return training_network, test_network