How to close a session after a conversation completed

a conversation has completed. but i do not know how to close the session by using sender_id.