def sampled_fluxes_minrange(sampled_fluxes, min_val, max_val):
    """
    Sometimes the sampled fluxes include very small predicted fluxes
    for a lot of different reactions. They might be relevant but can
    easily overwhealm plots. This function reduces the subset of
    fluxes regarded for plots.

    Parameters
    ----------
    sampled_fluxes : pandas.Dataframe
        The calculated fluxes, output of sampling. For each reaction,
        n fluxes will be calculated (n = number of samples taken).
    min_val : float, int
        Min value for excluded subset.
    max_val : float, int
        Max value for excluded subset.

    Returns
    -------
    sampled_fluxes : pandas.Dataframe
        Reduced subset of the input.
    """

    def in_between(column):
        return not all(column.between(min_val, max_val, inclusive=False))

    criteria = list(
        sampled_fluxes.apply(in_between, axis=0, result_type="reduce")
    )
    return sampled_fluxes[sampled_fluxes.columns[criteria]]