human
I wrote the below code

    def predict(u, v):
        union_size = len((set(G[u]) | set(G[v])))
        if (union_size == 0):
            return 0
        return (len(list(nx.common_neighbors(G, u, v))) / union_size)
    return _apply_prediction(G, predict, ebunch)

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

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