def single_flux(reaction, consumption=True):
    """flux into single product for a reaction

    only defined for reactions with single products

    Parameters
    ----------
    reaction : Reaction
        the reaction to product flux for
    consumption : bool
        flux for consumed metabolite, else produced

    Returns
    -------
    tuple
        metabolite, flux for the metabolite"""
    if len(list(reaction.metabolites)) != 1:
        raise ValueError('product flux only defined for single metabolite reactions')
    met, coeff = list(reaction.metabolites.items())[0]
    direction = 1 if consumption else -1
    return met, reaction.flux * coeff * direction