def _create_bound(model, reaction, bound_type, f_replace, units=None,<EOL>flux_udef=None):
value = getattr(reaction, bound_type)<EOL>if value == config.lower_bound:<EOL><INDENT>return LOWER_BOUND_ID<EOL><DEDENT>elif value == <NUM_LIT:0>:<EOL><INDENT>return ZERO_BOUND_ID<EOL><DEDENT>elif value == config.upper_bound:<EOL><INDENT>return UPPER_BOUND_ID<EOL><DEDENT>elif value == -float("<STR_LIT>"):<EOL><INDENT>return BOUND_MINUS_INF<EOL><DEDENT>elif value == float("<STR_LIT>"):<EOL><INDENT>return BOUND_PLUS_INF<EOL><DEDENT>else:<EOL><INDENT>rid = reaction.id<EOL>if f_replace and F_REACTION_REV in f_replace:<EOL><INDENT>rid = f_replace[F_REACTION_REV](rid)<EOL><DEDENT>pid = rid + "<STR_LIT:_>" + bound_type<EOL>_create_parameter(model, pid=pid, value=value, sbo=SBO_FLUX_BOUND,<EOL>units=units, flux_udef=flux_udef)<EOL>return pid<EOL><DEDENT>
Creates bound in model for given reaction.

    Adds the parameters for the bounds to the SBML model.

    Parameters
    ----------
    model : libsbml.Model
        SBML model instance
    reaction : cobra.core.Reaction
        Cobra reaction instance from which the bounds are read.
    bound_type : {LOWER_BOUND, UPPER_BOUND}
        Type of bound
    f_replace : dict of id replacement functions
    units : flux units

    Returns
    -------
    Id of bound parameter.