human
I wrote the below code

    if (G.number_of_edges() == 0):
        (yield tuple(nx.connected_components(G)))
        return
    if (most_valuable_edge is None):
        def most_valuable_edge(G):
            'Returns    the    edge    with    the    highest    betweenness    centrality\n                                                in    the    graph    `G`.\n\n                                                '
            betweenness = nx.edge_betweenness_centrality(G)
            return max(betweenness, key=betweenness.get)
    g = G.copy().to_undirected()
    g.remove_edges_from(g.selfloop_edges())
    while (g.number_of_edges() > 0):
        (yield _without_most_central_edges(g, most_valuable_edge))

What's a good function header?

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

def girvan_newman(G, most_valuable_edge=None):