def dict_values_map(f, d):
    """
    Simple helper to apply a function to the values of a dictionary.

    This is similar to built-in map() but only accept one iterable dict.
    """
    return {k: f(v) for k, v in d.items()}