ok, good point. I will also remove average similarity and import cosine_distance from util. I was trying not to change many things for some reason.

What about naming the function? average_link?