def _solve_using_known_values(result, solver):
    'Solves the system using already known solution\n        (result contains the dict <symbol: value>).\n        solver is `solveset_complex` or `solveset_real`.\n        '
    soln_imageset = {}
    total_solvest_call = 0
    total_conditionst = 0
    for (index, eq) in enumerate(eqs_in_better_order):
        newresult = []
        original_imageset = {}
        imgset_yes = False
        result = _new_order_result(result, eq)
        for res in result:
            got_symbol = set()
            if soln_imageset:
                for (key_res, value_res) in res.items():
                    if isinstance(value_res, ImageSet):
                        res[key_res] = value_res.lamda.expr
                        original_imageset[key_res] = value_res
                        dummy_n = value_res.lamda.expr.atoms(Dummy).pop()
                        base = value_res.base_set
                        imgset_yes = (dummy_n, base)
            eq2 = eq.subs(res)
            unsolved_syms = _unsolved_syms(eq2, sort=True)
            if (not unsolved_syms):
                if res:
                    (newresult, delete_res) = _append_new_soln(res, None, None, imgset_yes, soln_imageset, original_imageset, newresult, eq2)
                    if delete_res:
                        result.remove(res)
                continue
            depen = eq2.as_independent(unsolved_syms)[0]
            if (depen.has(Abs) and (solver == solveset_complex)):
                continue
            soln_imageset = {}
            for sym in unsolved_syms:
                not_solvable = False
                try:
                    soln = solver(eq2, sym)
                    total_solvest_call += 1
                    soln_new = S.EmptySet
                    if isinstance(soln, Complement):
                        complements[sym] = soln.args[1]
                        soln = soln.args[0]
                    if isinstance(soln, Intersection):
                        if (soln.args[0] != Interval((- oo), oo)):
                            intersections[sym] = soln.args[0]
                        soln_new += soln.args[1]
                    soln = (soln_new if soln_new else soln)
                    if ((index > 0) and (solver == solveset_real)):
                        if (not isinstance(soln, (ImageSet, ConditionSet))):
                            soln += solveset_complex(eq2, sym)
                except NotImplementedError:
                    continue
                if isinstance(soln, ConditionSet):
                    soln = S.EmptySet
                    not_solvable = True
                    total_conditionst += 1
                if (soln is not S.EmptySet):
                    (soln, soln_imageset) = _extract_main_soln(soln, soln_imageset)
                for sol in soln:
                    (sol, soln_imageset) = _extract_main_soln(sol, soln_imageset)
                    sol = set(sol).pop()
                    free = sol.free_symbols
                    if (got_symbol and any([(ss in free) for ss in got_symbol])):
                        continue
                    rnew = res.copy()
                    for (k, v) in res.items():
                        if isinstance(v, Expr):
                            rnew[k] = v.subs(sym, sol)
                    if soln_imageset:
                        imgst = soln_imageset[sol]
                        rnew[sym] = imgst.lamda(*[0 for i in range(0, len(imgst.lamda.variables))])
                    else:
                        rnew[sym] = sol
                    (newresult, delete_res) = _append_new_soln(rnew, sym, sol, imgset_yes, soln_imageset, original_imageset, newresult)
                    if delete_res:
                        result.remove(res)
                if (not not_solvable):
                    got_symbol.add(sym)
        if newresult:
            result = newresult
    return (result, total_solvest_call, total_conditionst)
Solves the system using already known solution
(result contains the dict <symbol: value>).
solver is `solveset_complex` or `solveset_real`.
def _solve_using_known_values(result, solver):
    'Solves the system using already known solution\n        (result contains the dict <symbol: value>).\n        solver is `solveset_complex` or `solveset_real`.\n        '
    soln_imageset = {}
    total_solvest_call = 0
    total_conditionst = 0
    for (index, eq) in enumerate(eqs_in_better_order):
        newresult = []
        original_imageset = {}
        imgset_yes = False
        result = _new_order_result(result, eq)
        for res in result:
            got_symbol = set()
            if soln_imageset:
                for (key_res, value_res) in res.items():
                    if isinstance(value_res, ImageSet):
                        res[key_res] = value_res.lamda.expr
                        original_imageset[key_res] = value_res
                        dummy_n = value_res.lamda.expr.atoms(Dummy).pop()
                        base = value_res.base_set
                        imgset_yes = (dummy_n, base)
            eq2 = eq.subs(res)
            unsolved_syms = _unsolved_syms(eq2, sort=True)
            if (not unsolved_syms):
                if res:
                    (newresult, delete_res) = _append_new_soln(res, None, None, imgset_yes, soln_imageset, original_imageset, newresult, eq2)
                    if delete_res:
                        result.remove(res)
                continue
            depen = eq2.as_independent(unsolved_syms)[0]
            if (depen.has(Abs) and (solver == solveset_complex)):
                continue
            soln_imageset = {}
            for sym in unsolved_syms:
                not_solvable = False
                try:
                    soln = solver(eq2, sym)
                    total_solvest_call += 1
                    soln_new = S.EmptySet
                    if isinstance(soln, Complement):
                        complements[sym] = soln.args[1]
                        soln = soln.args[0]
                    if isinstance(soln, Intersection):
                        if (soln.args[0] != Interval((- oo), oo)):
                            intersections[sym] = soln.args[0]
                        soln_new += soln.args[1]
                    soln = (soln_new if soln_new else soln)
                    if ((index > 0) and (solver == solveset_real)):
                        if (not isinstance(soln, (ImageSet, ConditionSet))):
                            soln += solveset_complex(eq2, sym)
                except NotImplementedError:
                    continue
                if isinstance(soln, ConditionSet):
                    soln = S.EmptySet
                    not_solvable = True
                    total_conditionst += 1
                if (soln is not S.EmptySet):
                    (soln, soln_imageset) = _extract_main_soln(soln, soln_imageset)
                for sol in soln:
                    (sol, soln_imageset) = _extract_main_soln(sol, soln_imageset)
                    sol = set(sol).pop()
                    free = sol.free_symbols
                    if (got_symbol and any([(ss in free) for ss in got_symbol])):
                        continue
                    rnew = res.copy()
                    for (k, v) in res.items():
                        if isinstance(v, Expr):
                            rnew[k] = v.subs(sym, sol)
                    if soln_imageset:
                        imgst = soln_imageset[sol]
                        rnew[sym] = imgst.lamda(*[0 for i in range(0, len(imgst.lamda.variables))])
                    else:
                        rnew[sym] = sol
                    (newresult, delete_res) = _append_new_soln(rnew, sym, sol, imgset_yes, soln_imageset, original_imageset, newresult)
                    if delete_res:
                        result.remove(res)
                if (not not_solvable):
                    got_symbol.add(sym)
        if newresult:
            result = newresult
    return (result, total_solvest_call, total_conditionst)