<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def flux_bound(self, reaction, direction):
 """Return the flux bound of the reaction. Direction must be a positive number to obtain the upper bound or a negative number to obtain the lower bound. A value of inf or -inf is returned if the problem is unbounded. """

        try:
            self.maximize({reaction: direction})
        except FluxBalanceError as e:
            if not e.result.unbounded:
                raise
            return direction * _INF
        else:
            return self.get_flux(reaction)