def local_node_connectivity(G, s, t, flow_func=None, auxiliary=None, residual=None, cutoff=None):
 if (flow_func is None):
  flow_func = default_flow_func
 if (auxiliary is None):
  H = build_auxiliary_node_connectivity(G)
 else:
  H = auxiliary
 mapping = H.graph.get('mapping', None)
 if (mapping is None):
  raise nx.NetworkXError('Invalid auxiliary digraph.')
 kwargs = dict(flow_func=flow_func, residual=residual)
 if (flow_func is shortest_augmenting_path):
  kwargs['cutoff'] = cutoff
  kwargs['two_phase'] = True
 elif (flow_func is edmonds_karp):
  kwargs['cutoff'] = cutoff
 elif (flow_func is dinitz):
  kwargs['cutoff'] = cutoff
 elif (flow_func is boykov_kolmogorov):
  kwargs['cutoff'] = cutoff
 return nx.maximum_flow_value(H, ('%sB' % mapping[s]), ('%sA' % mapping[t]), **kwargs)

def local_node_connectivity ( G , s , t , flow_func = None , auxiliary = None , residual = None , cutoff = None ) : if ( flow_func is None ) : flow_func = default_flow_func if ( auxiliary is None ) : H = build_auxiliary_node_connectivity ( G ) else : H = auxiliary mapping = H . graph . get ( 'mapping' , None ) if ( mapping is None ) : raise nx . NetworkXError ( 'Invalid auxiliary digraph.' ) kwargs = dict ( flow_func = flow_func , residual = residual ) if ( flow_func is shortest_augmenting_path ) : kwargs [ 'cutoff' ] = cutoff kwargs [ 'two_phase' ] = True elif ( flow_func is edmonds_karp ) : kwargs [ 'cutoff' ] = cutoff elif ( flow_func is dinitz ) : kwargs [ 'cutoff' ] = cutoff elif ( flow_func is boykov_kolmogorov ) : kwargs [ 'cutoff' ] = cutoff return nx . maximum_flow_value ( H , ( '%sB' % mapping [ s ] ) , ( '%sA' % mapping [ t ] ) , ** kwargs )
computes local node connectivity for nodes s and t .