human
Here's a good function header given the following:
I wrote the below code

    if (((s is not None) and (t is None)) or ((s is None) and (t is not None))):
        raise nx.NetworkXError('Both    source    and    target    must    be    specified.')
    if ((s is not None) and (t is not None)):
        if (s not in G):
            raise nx.NetworkXError(('node    %s    not    in    graph' % s))
        if (t not in G):
            raise nx.NetworkXError(('node    %s    not    in    graph' % t))
        return local_node_connectivity(G, s, t, flow_func=flow_func)
    if G.is_directed():
        if (not nx.is_weakly_connected(G)):
            return 0
        iter_func = itertools.permutations
        def neighbors(v):
            return itertools.chain.from_iterable([G.predecessors(v), G.successors(v)])
    else:
        if (not nx.is_connected(G)):
            return 0
        iter_func = itertools.combinations
        neighbors = G.neighbors
    H = build_auxiliary_node_connectivity(G)
    R = build_residual_network(H, 'capacity')
    kwargs = dict(flow_func=flow_func, auxiliary=H, residual=R)
    (v, K) = min(G.degree(), key=itemgetter(1))
    for w in ((set(G) - set(neighbors(v))) - set([v])):
        kwargs['cutoff'] = K
        K = min(K, local_node_connectivity(G, v, w, **kwargs))
    for (x, y) in iter_func(neighbors(v), 2):
        if (y in G[x]):
            continue
        kwargs['cutoff'] = K
        K = min(K, local_node_connectivity(G, x, y, **kwargs))
    return K

What's a good function header?
assistant
#Here's a good function header.

def node_connectivity(G, s=None, t=None, flow_func=None):