human
I wrote the below code

    def predict(u, v):
        return sum(((1 / G.degree(w)) for w in nx.common_neighbors(G, u, v)))
    return _apply_prediction(G, predict, ebunch)

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

@not_implemented_for('directed')
@not_implemented_for('multigraph')
def resource_allocation_index(G, ebunch=None):