def analogy_func(wrap, a1, b1, a2, weight_direct=2 / 3, weight_transpose=1 / 3
    ):
    """
    Find the vector representing the best b2 to complete the analogy
    a1 : b1 :: a2 : b2, according to `pairwise_analogy_func`.

    This is the partial derivative of `pairwise_analogy_func` with respect
    to b2.
    """
    va1 = wrap.get_vector(a1)
    vb1 = wrap.get_vector(b1)
    va2 = wrap.get_vector(a2)
    return (vb1 - va1) * weight_direct + (va2 - va1) * weight_transpose + vb1
