def best_analogy_3cosmul(wrap, subframe, a1, b1, a2):
    """
    Find the best b2 to complete the analogy a1 : b1 :: a2 : b2, according
    to the 3CosMul metric.
    """
    va1 = wrap.get_vector(a1)
    vb1 = wrap.get_vector(b1)
    va2 = wrap.get_vector(a2)
    sa1 = subframe.dot(va1)
    sb1 = subframe.dot(vb1)
    sa2 = subframe.dot(va2)
    eps = 1e-06
    mul3cos = (sb1 + 1 + eps) * (sa2 + 1 + eps) / (sa1 + 1 + eps)
    best = mul3cos.dropna().nlargest(4)
    prompt = a1, b1, a2
    for term in best.index:
        if term not in prompt:
            return term
