def maximum_flow_value(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.')
 R = flow_func(G, s, t, capacity=capacity, value_only=True, **kwargs)
 return R.graph['flow_value']

def maximum_flow_value ( 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.' ) R = flow_func ( G , s , t , capacity = capacity , value_only = True , ** kwargs ) return R . graph [ 'flow_value' ]
find the value of maximum single-commodity flow .