<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def frequency_to_probability(frequency_map, decorator=lambda f: f):
 """Transform a ``frequency_map`` into a map of probability using the sum of all frequencies as the total. Example: {'a': 0.5, 'b': 0.5} Args: frequency_map (dict):
 The dictionary to transform decorator (function):
 A function to manipulate the probability Returns: Dictionary of ngrams to probability """

    total = sum(frequency_map.values())
    return {k: decorator(v / total) for k, v in frequency_map.items()}