code: def test_websocket():
      client = TestClient(app)
      with client.websocket_connect("/ws") as websocket:
          data = websocket.receive_json()
          assert data == {"msg": "Hello WebSocket"}
  
imports: from fastapi import FastAPI
  from fastapi.testclient import TestClient
  from fastapi.websockets import WebSocket
label_desc: Use image node_id 2 for calling a global function with example usage: test_websocket() without return types