

def dmp_content(f, u, K):
    '\n    Returns GCD of multivariate coefficients.\n\n    Examples\n    ========\n\n    >>> from sympy.polys import ring, ZZ\n    >>> R, x,y, = ring("x,y", ZZ)\n\n    >>> R.dmp_content(2*x*y + 6*x + 4*y + 12)\n    2*y + 6\n\n    '
    (cont, v) = (dmp_LC(f, K), (u - 1))
    if dmp_zero_p(f, u):
        return cont
    for c in f[1:]:
        cont = dmp_gcd(cont, c, v, K)
        if dmp_one_p(f, v, K):
            break
    if K.is_negative(dmp_ground_LC(cont, v, K)):
        return dmp_neg(cont, v, K)
    else:
        return cont

dataset/ETHPy150Open sympy/sympy/sympy/polys/euclidtools.py dmp_content/VarMisuse@78/213 `cont`->`f`