<s> from experiments . utils import participant , clear_participant_cache <EOL> def transfer_enrollments_to_user ( sender , request , user , ** kwargs ) : <EOL> anon_user = participant ( session = request . session ) <EOL> authenticated_user = participant ( user = user ) <EOL> authenticated_user . incorporate ( anon_user ) <EOL> clear_participant_cache ( request ) <EOL> def handle_user_logged_out ( sender , request , user , ** kwargs ) : <EOL> clear_participant_cache ( request ) </s>
