<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def action_delete(self, ids):
 """Delete selected sessions."""

        is_current = any(SessionActivity.is_current(sid_s=id_) for id_ in ids)
        if is_current:
            flash('You could not remove your current session', 'error')
            return
        for id_ in ids:
            delete_session(sid_s=id_)
        db.session.commit()