code: def on_close(ws):
      """
      Cleanup before closing connection.
  
      :param ws: WebSocketApp
      """
      # Reset color formatting if necessary
      print("\033[0m")
      print("Connection closed")
  
file_path: ParlAI/parlai/chat_service/services/terminal_chat/client.py
imports: import json
  import uuid
  import websocket
  import time
  import threading
  from parlai.core.params import ParlaiParser
label_desc: Use image node_id 5 for calling a global function with example usage: on_close(ws) without return types