docstr: Runs when a socket is closed.
docstr_tok: ["Runs","when","a","socket","is","closed","."]
code: def on_close(self):
      """
      Runs when a socket is closed.
      """
      del self.subs[self.sid]
  
file_path: ParlAI/parlai/chat_service/services/websocket/sockets.py
imports: from typing import Dict, TypeVar
  from tornado.websocket import WebSocketHandler
  import uuid
  import logging
  import json
label_desc: Use image node_id 3 for calling the MessageSocketHandler obj's underlying member method code with example usage: obj.on_close() without return types