code: def on_close(ws):
      """
      Cleanup before closing connection.
  
      :param ws: WebSocketApp
      """
      # Reset color formatting if necessary
      print("Connection closed")
  
imports: import json
  import websocket
  import threading
  from parlai.core.params import ParlaiParser
  from parlai.scripts.interactive_web import WEB_HTML, STYLE_SHEET, FONT_AWESOME
  from http.server import BaseHTTPRequestHandler, HTTPServer
label_desc: Use image node_id 4 for calling a global function with example usage: on_close(ws) without return types