def sign_out_other_sessions(user, request):
    count = 0
    active_sessions = get_active_sessions(user=user, request=request)
    for session_info in active_sessions:
        if not session_info.is_current:
            session_info.session.flush()
            count += 1
    return count
Alters M2Ms to repoint their to= endpoints.
dataset/ETHPy150Open nigma/django-session-activity/session_activity/activity.py/sign_out_other_sessions--crossover with--dataset/ETHPy150Open django/django/django/db/backends/base/schema.py/BaseDatabaseSchemaEditor._alter_many_to_many