def _get_flux_bounds(self, r_id, model, flux_limits, equation):
if r_id not in flux_limits or flux_limits[r_id][<NUM_LIT:0>] is None:<EOL><INDENT>if equation.direction == Direction.Forward:<EOL><INDENT>lower = <NUM_LIT:0><EOL><DEDENT>else:<EOL><INDENT>lower = -model.default_flux_limit<EOL><DEDENT><DEDENT>else:<EOL><INDENT>lower = flux_limits[r_id][<NUM_LIT:0>]<EOL><DEDENT>if r_id not in flux_limits or flux_limits[r_id][<NUM_LIT:1>] is None:<EOL><INDENT>if equation.direction == Direction.Reverse:<EOL><INDENT>upper = <NUM_LIT:0><EOL><DEDENT>else:<EOL><INDENT>upper = model.default_flux_limit<EOL><DEDENT><DEDENT>else:<EOL><INDENT>upper = flux_limits[r_id][<NUM_LIT:1>]<EOL><DEDENT>if lower % <NUM_LIT:1> == <NUM_LIT:0>:<EOL><INDENT>lower = int(lower)<EOL><DEDENT>if upper % <NUM_LIT:1> == <NUM_LIT:0>:<EOL><INDENT>upper = int(upper)<EOL><DEDENT>return text_type(lower), text_type(upper)<EOL>
Read reaction's limits to set up strings for limits in the output file.