def all_pairs_node_connectivity(G, nbunch=None, flow_func=None):
    if nbunch is None:
        nbunch = G
    else:
        nbunch = set(nbunch)

    directed = G.is_directed()
    if directed:
        iter_func = itertools.permutations
    else:
        iter_func = itertools.combinations

    all_pairs = {n: {} for n in nbunch}

    # Reuse auxiliary digraph and residual network
    H = build_auxiliary_node_connectivity(G)
    mapping = H.graph['mapping']
    R = build_residual_network(H, 'capacity')
    kwargs = dict(flow_func=flow_func, auxiliary=H, residual=R)

    for u, v in iter_func(nbunch, 2):
        K = local_node_connectivity(G, u, v, **kwargs)
        all_pairs[u][v] = K
        if not directed:
            all_pairs[v][u] = K

    return all_pairs
Make it possible to override storage paths in settings.
dataset/ETHPy150Open networkx/networkx/networkx/algorithms/connectivity/connectivity.py/all_pairs_node_connectivity--crossover with--dataset/ETHPy150Open mozilla/addons-server/services/utils.py/user_media_path