def networks():
    networks = collections.defaultdict(list)
    for (k, v) in base_networks.items():
        if isinstance(v, dict):
            for (_k, _v) in v.items():
                net = Network(_v)
                networks[net.id].append((k, _k, net))
        else:
            net = Network(v)
            networks[net.id].append((k, net))
    _networks = []
    for (k, v) in networks.items():
        _networks.extend(list(itertools.combinations(v, 2)))
    return _networks
def networks():
    networks = collections.defaultdict(list)
    for (k, v) in base_networks.items():
        if isinstance(v, dict):
            for (_k, _v) in v.items():
                net = Network(_v)
                networks[net.id].append((k, _k, net))
        else:
            net = Network(v)
            networks[net.id].append((k, net))
    _networks = []
    for (k, v) in networks.items():
        _networks.extend(list(itertools.combinations(v, 2)))
    return _networks