<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def remove_reaction(self, reaction):
 """Remove reaction from model"""


        if reaction not in self._reaction_set:
            return

        self._reaction_set.remove(reaction)
        self._limits_lower.pop(reaction, None)
        self._limits_upper.pop(reaction, None)

        # Remove compound from compound_set if it is not referenced
        # by any other reactions in the model.
        for compound, value in self._database.get_reaction_values(reaction):
            reactions = frozenset(
                self._database.get_compound_reactions(compound))
            if all(other_reaction not in self._reaction_set
                   for other_reaction in reactions):
                self._compound_set.remove(compound)