code: def _start_websocket():
      global _THREAD  # pylint: disable=global-statement
      if not _THREAD:
          _logger.debug("Starting the watch_app_state thread.")
          _THREAD = Thread(target=_target_fn)
          _THREAD.setDaemon(True)
          _THREAD.start()
          _logger.debug("thread started")
  
file_path: pytorch-lightning/src/lightning/app/frontend/panel/app_state_comm.py
imports: from __future__ import annotations
  import asyncio
  import os
  from threading import Thread
  from typing import Callable
  import websockets
  from lightning.app.core.constants import APP_SERVER_PORT
  from lightning.app.utilities.app_helpers import Logger
label_desc: Use image node_id 5 for calling a global function with example usage: _start_websocket() without return types