def _solve_radical(f, symbol, solveset_solver):
    ' Helper function to solve equations with radicals '
    (eq, cov) = unrad(f)
    if (not cov):
        result = (solveset_solver(eq, symbol) - Union(*[solveset_solver(g, symbol) for g in denoms(f, [symbol])]))
    else:
        (y, yeq) = cov
        if (not solveset_solver((y - I), y)):
            yreal = Dummy('yreal', real=True)
            yeq = yeq.xreplace({y: yreal})
            eq = eq.xreplace({y: yreal})
            y = yreal
        g_y_s = solveset_solver(yeq, symbol)
        f_y_sols = solveset_solver(eq, y)
        result = Union(*[imageset(Lambda(y, g_y), f_y_sols) for g_y in g_y_s])
    if isinstance(result, Complement):
        solution_set = result
    else:
        f_set = []
        c_set = []
        for s in result:
            if checksol(f, symbol, s):
                f_set.append(s)
            else:
                c_set.append(s)
        solution_set = (FiniteSet(*f_set) + ConditionSet(symbol, Eq(f, 0), FiniteSet(*c_set)))
    return solution_set
Helper function to solve equations with radicals
def _solve_radical(f, symbol, solveset_solver):
    '  '
    (eq, cov) = unrad(f)
    if (not cov):
        result = (solveset_solver(eq, symbol) - Union(*[solveset_solver(g, symbol) for g in denoms(f, [symbol])]))
    else:
        (y, yeq) = cov
        if (not solveset_solver((y - I), y)):
            yreal = Dummy('yreal', real=True)
            yeq = yeq.xreplace({y: yreal})
            eq = eq.xreplace({y: yreal})
            y = yreal
        g_y_s = solveset_solver(yeq, symbol)
        f_y_sols = solveset_solver(eq, y)
        result = Union(*[imageset(Lambda(y, g_y), f_y_sols) for g_y in g_y_s])
    if isinstance(result, Complement):
        solution_set = result
    else:
        f_set = []
        c_set = []
        for s in result:
            if checksol(f, symbol, s):
                f_set.append(s)
            else:
                c_set.append(s)
        solution_set = (FiniteSet(*f_set) + ConditionSet(symbol, Eq(f, 0), FiniteSet(*c_set)))
    return solution_set