def _dup_ff_trivial_gcd(f, g, K):
    if not (f or g):
        return [], [], []
    elif not f:
        return dup_monic(g, K), [], [dup_LC(g, K)]
    elif not g:
        return dup_monic(f, K), [dup_LC(f, K)], []
    else:
        return None
Handle trivial cases in GCD algorithm over a field.
dataset/ETHPy150Open sympy/sympy/sympy/polys/euclidtools.py/_dup_ff_trivial_gcd