def match_mass(candidates: list, range: tuple) -> list:
    """
    Matches candidate m/z values to tolerance range.

    Args:
        candidates (List[float]): list of candidate m/z values.
        range (Tuple[float, float]): tolerance range for m/z matches in format:
            (minimum m/z, maximum m/z).

    Returns:
        List[float]: list of candidate m/z values that match error tolerance.
    """
    return [
        float(mass) for mass in candidates
        if float(mass) >= range[0] and float(mass) <= range[1]]