def _append_new_soln(rnew, sym, sol, imgset_yes, soln_imageset, original_imageset, newresult, eq=None):
    'If `rnew` (A dict <symbol: soln>) contains valid soln\n        append it to `newresult` list.\n        `imgset_yes` is (base, dummy_var) if there was imageset in previously\n         calculated result(otherwise empty tuple). `original_imageset` is dict\n         of imageset expr and imageset from this result.\n        `soln_imageset` dict of imageset expr and imageset of new soln.\n        '
    satisfy_exclude = _check_exclude(rnew, imgset_yes)
    delete_soln = False
    if (not satisfy_exclude):
        local_n = None
        if imgset_yes:
            local_n = imgset_yes[0]
            base = imgset_yes[1]
            if (sym and sol):
                dummy_list = list(sol.atoms(Dummy))
                local_n_list = [local_n for i in range(0, len(dummy_list))]
                dummy_zip = zip(dummy_list, local_n_list)
                lam = Lambda(local_n, sol.subs(dummy_zip))
                rnew[sym] = ImageSet(lam, base)
            if (eq is not None):
                (newresult, rnew, delete_soln) = _append_eq(eq, newresult, rnew, delete_soln, local_n)
        elif (eq is not None):
            (newresult, rnew, delete_soln) = _append_eq(eq, newresult, rnew, delete_soln)
        elif soln_imageset:
            rnew[sym] = soln_imageset[sol]
            _restore_imgset(rnew, original_imageset, newresult)
        else:
            newresult.append(rnew)
    elif satisfy_exclude:
        delete_soln = True
        rnew = {}
    _restore_imgset(rnew, original_imageset, newresult)
    return (newresult, delete_soln)
If `rnew` (A dict <symbol: soln>) contains valid soln
append it to `newresult` list.
`imgset_yes` is (base, dummy_var) if there was imageset in previously
 calculated result(otherwise empty tuple). `original_imageset` is dict
 of imageset expr and imageset from this result.
`soln_imageset` dict of imageset expr and imageset of new soln.
def _append_new_soln(rnew, sym, sol, imgset_yes, soln_imageset, original_imageset, newresult, eq=None):
    'If `rnew` (A dict <symbol: soln>) contains valid soln\n        append it to `newresult` list.\n        `imgset_yes` is (base, dummy_var) if there was imageset in previously\n         calculated result(otherwise empty tuple). `original_imageset` is dict\n         of imageset expr and imageset from this result.\n        `soln_imageset` dict of imageset expr and imageset of new soln.\n        '
    satisfy_exclude = _check_exclude(rnew, imgset_yes)
    delete_soln = False
    if (not satisfy_exclude):
        local_n = None
        if imgset_yes:
            local_n = imgset_yes[0]
            base = imgset_yes[1]
            if (sym and sol):
                dummy_list = list(sol.atoms(Dummy))
                local_n_list = [local_n for i in range(0, len(dummy_list))]
                dummy_zip = zip(dummy_list, local_n_list)
                lam = Lambda(local_n, sol.subs(dummy_zip))
                rnew[sym] = ImageSet(lam, base)
            if (eq is not None):
                (newresult, rnew, delete_soln) = _append_eq(eq, newresult, rnew, delete_soln, local_n)
        elif (eq is not None):
            (newresult, rnew, delete_soln) = _append_eq(eq, newresult, rnew, delete_soln)
        elif soln_imageset:
            rnew[sym] = soln_imageset[sol]
            _restore_imgset(rnew, original_imageset, newresult)
        else:
            newresult.append(rnew)
    elif satisfy_exclude:
        delete_soln = True
        rnew = {}
    _restore_imgset(rnew, original_imageset, newresult)
    return (newresult, delete_soln)