def dict_value_to_key(d, value):
    """
    Utility function to key for a given value inside the dic
    :param d:
    :param value:
    :return:
    """
    for k, v in d.items():
        if v == value:
            return k
    return None