def freqs2probs(freqs):
    """Converts the given frequencies (list of numeric values) into probabilities.
    This just normalizes them to have sum = 1"""
    freqs = list(freqs)
    total = float(sum(freqs))
    return [f/total for f in freqs]