'Eliminates unnecessary constraints and short circuits the solver
if possible.
Parameters
objective : LinOp
The canonicalized objective.
constr_map : dict
A map of constraint type to a list of constraints.
Returns
bool
Is the problem infeasible?'

@staticmethod
def presolve(objective, constr_map):

    for (key, constraints) in constr_map.items():
        uniq_constr = unique(constraints, key=(lambda c: c.constr_id))
        constr_map[key] = list(uniq_constr)
    if (not any(constr_map.values())):
        str(objective)
    for key in [s.EQ, s.LEQ]:
        new_constraints = []
        for constr in constr_map[key]:
            vars_ = lu.get_expr_vars(constr.expr)
            if ((len(vars_) == 0) and (not lu.get_expr_params(constr.expr))):
                (V, I, J, coeff) = canonInterface.get_problem_matrix([constr])
                (is_pos, is_neg) = intf.sign(coeff)
                if (((key == s.EQ) and (not (is_pos and is_neg))) or ((key == s.LEQ) and (not is_neg))):
                    return s.INFEASIBLE
            else:
                new_constraints.append(constr)
        constr_map[key] = new_constraints
    return None
