def minimum_cut(G, s, t, capacity='capacity', flow_func=None, **kwargs):
    if flow_func is None:
        if kwargs:
            raise nx.NetworkXError("You have to explicitly set a flow_func if"
                                   " you need to pass parameters via kwargs.")
        flow_func = default_flow_func

    if not callable(flow_func):
        raise nx.NetworkXError("flow_func has to be callable.")

    if kwargs.get('cutoff') is not None and flow_func in flow_funcs:
        raise nx.NetworkXError("cutoff should not be specified.")

    R = flow_func(G, s, t, capacity=capacity, value_only=True, **kwargs)
    # Remove saturated edges from the residual network 
    cutset = [(u, v, d) for u, v, d in R.edges(data=True)
              if d['flow'] == d['capacity']]
    R.remove_edges_from(cutset)

    # Then, reachable and non reachable nodes from source in the
    # residual network form the node partition that defines
    # the minimum cut.
    non_reachable = set(dict(nx.shortest_path_length(R, target=t)))
    partition = (set(G) - non_reachable, non_reachable)
    # Finaly add again cutset edges to the residual network to make
    # sure that it is reusable.
    if cutset is not None:
        R.add_edges_from(cutset)
    return (R.graph['flow_value'], partition)
A named url that django can use to call this function. Default is controller_action
dataset/ETHPy150Open networkx/networkx/networkx/algorithms/flow/maxflow.py/minimum_cut--crossover with--dataset/ETHPy150Open zeraien/django-url-framework/django_url_framework/decorators/action_options.py/named_url