<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def is_exchange(self, reaction_id):
 """Whether the given reaction is an exchange reaction."""

        reaction = self.get_reaction(reaction_id)
        return (len(reaction.left) == 0) != (len(reaction.right) == 0)