def METHOD_NAME(
    self, role: UserRoleInWorkspace, context: TracimContext
) -> None:
    wapi = WorkspaceApi(context.dbsession, None, context.app_config)
    role_api = RoleApi(context.dbsession, None, context.app_config)
    for workspace in wapi.get_all_for_user(role.user):
        role_api.delete_one(role.user.user_id, workspace.workspace_id, flush=False)