def get_key_from_val(dict_, val, unknown=None):
    """
    dict_ = {'aa':123}
    val = 123
    get_key_from_val(dict_, val)
    > 'aa'    
    """
    list_vals = list(dict_.values())
    if val in list_vals:
        return list(dict_.keys())[list_vals.index(val)]    
    else:
        return unknown