def _cosine(a, b):
    """ Return the len(a & b) / len(a) """
    return 1. * len(a & b) / (math.sqrt(len(a)) * math.sqrt(len(b)))
def _cosine ( a , b ) : return 1. * len ( a & b ) / ( math . sqrt ( len ( a ) ) * math . sqrt ( len ( b ) ) )
Return the len(a & b) / len(a)