def remove_from_map(mapping, key, value):
    """
    Removes a value value associated with the key key from a dict {key: values} where values is
    a collection of values associated with key.
    :param key: key of interest
    :param value: value to be removed
    :param mapping: dict {key: values}
    :return: void
    """
    if key in mapping and value in mapping[key]:
        mapping[key].remove(value)
        if not mapping[key]:
            del mapping[key]
