def dup_rr_prs_gcd(f, g, K):
    result = _dup_rr_trivial_gcd(f, g, K)

    if result is not None:
        return result

    fc, F = dup_primitive(f, K)
    gc, G = dup_primitive(g, K)

    c = K.gcd(fc, gc)

    h = dup_subresultants(F, G, K)[-1]
    _, h = dup_primitive(h, K)

    if K.is_negative(dup_LC(h, K)):
        c = -c

    h = dup_mul_ground(h, c, K)

    cff = dup_quo(f, h, K)
    cfg = dup_quo(g, h, K)

    return h, cff, cfg
Compute the conditional mean \psi given \omega
dataset/ETHPy150Open sympy/sympy/sympy/polys/euclidtools.py/dup_rr_prs_gcd--crossover with--dataset/ETHPy150Open HIPS/pgmult/pgmult/distributions.py/PGMultinomialRegression.conditional_mean