<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def delete_user_role(deleted_user_id, role_id,**kwargs):
 """ Remove a user from a role """

    #check_perm(kwargs.get('user_id'), 'edit_role')
    try:
        _get_user(deleted_user_id)
        _get_role(role_id)
        roleuser_i = db.DBSession.query(RoleUser).filter(RoleUser.user_id==deleted_user_id, RoleUser.role_id==role_id).one()
        db.DBSession.delete(roleuser_i)
    except NoResultFound:
        raise ResourceNotFoundError("User Role does not exist")

    return 'OK'