code: def on_open(ws):
      """
      Starts a new thread that loops, taking user input and sending it to the websocket.
  
      :param ws: websocket.WebSocketApp that sends messages to a terminal_manager
      """
      id = _get_rand_id()
      threading.Thread(target=_run, args=(ws, id)).start()
  
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 7 for calling a global function with example usage: on_open(ws) without return types