def _solve(self, sense=None):
<EOL>while len(self._remove_constr) > <NUM_LIT:0>:<EOL><INDENT>self._remove_constr.pop().delete()<EOL><DEDENT>try:<EOL><INDENT>return self._prob.solve(sense=sense)<EOL><DEDENT>except lp.SolverError as e:<EOL><INDENT>raise_from(MOMAError(text_type(e)), e)<EOL><DEDENT>finally:<EOL><INDENT>self._remove_constr = []<EOL><DEDENT>
Remove old constraints and then solve the current problem.

        Args:
            sense: Minimize or maximize the objective.
                (:class:`.lp.ObjectiveSense)

        Returns:
            The Result object for the solved LP problem