'Make ``f`` and ``g`` belong to the same domain.
Examples
>>> from sympy import Poly
>>> from sympy.abc import x
>>> f, g = Poly(x/2 + 1), Poly(2*x + 1)
>>> f
Poly(1/2*x + 1, x, domain=\'QQ\')
>>> g
Poly(2*x + 1, x, domain=\'ZZ\')
>>> F, G = f.unify(g)
>>> F
Poly(1/2*x + 1, x, domain=\'QQ\')
>>> G
Poly(2*x + 1, x, domain=\'QQ\')'

def unify(f, g):

    (_, per, F, G) = f._unify(g)
    return (per(F), per(G))
