def get_fitted_area(df, fragment_ion, low = True):
    """Return the fitted area of a given fragment ion.
    Set low to false if the fitted area of the heavy fragment is desired.

    Parameters
    ----------
    df : Dataframe
        Dataframe containing the fitted areas of the fragment ions from one precursor m/z.
        Must contain the columns "fragment_ion", "fragment_mz" and "fitted_area"

    fragment_ion : str
        Desired fragment ion (e.g. "y7")

    low : bool
        True if the fitted area of the light fragment ion is desired.
        False for the heavy fragment ion.

    Returns
    -------
    float
        Fitted area for the given fragment ion
    """
    fitted_areas = df[df.fragment_ion == fragment_ion].sort_values(by=["fragment_mz"]).fitted_area.values
    if low:
        return fitted_areas[0]
    else:
        return fitted_areas[1]