def remove_tenant_user(request, project=None, user=None, domain=None):
    client = keystoneclient(request, admin=True)
    roles = client.roles.roles_for_user(user, project)
    for role in roles:
        remove_tenant_user_role(request, user=user, role=role.id,
                                project=project, domain=domain)
Removes all roles from a user on a tenant, removing them from it.
dataset/ETHPy150Open Havate/havate-openstack/proto-build/gui/horizon/Horizon_GUI/openstack_dashboard/api/keystone.py/remove_tenant_user