human
I wrote the below code

    if (with_span is not True):
        for (u, v) in G.edges:
            if (not (set(G[u]) & set(G[v]))):
                (yield (u, v))
    else:
        wt = nx.weighted._weight_function(G, weight)
        for (u, v) in G.edges:
            if (not (set(G[u]) & set(G[v]))):
                enodes = {u, v}
                def hide_edge(n, nbr, d):
                    if ((n not in enodes) or (nbr not in enodes)):
                        return wt(n, nbr, d)
                    return None
                try:
                    span = nx.shortest_path_length(G, u, v, weight=hide_edge)
                    (yield (u, v, span))
                except nx.NetworkXNoPath:
                    (yield (u, v, float('inf')))

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

@not_implemented_for('multigraph')
@not_implemented_for('directed')
def local_bridges(G, with_span=True, weight=None):