def get_dict_key_from_value(dictionary, val):
    """
    Return the key of a dictionary that stores the val

    Parameters
    ----------
    dictionary: dict
    val: anything that can be stored in a dictionary
    """

    for key in dictionary:
        value = dictionary[key]
        if val == value:
            return key
    return "key doesn't exist"