code: def test_server_disconnect(serve_instance):
      app = FastAPI()
  
      @serve.deployment
      @serve.ingress(app)
      class WebSocketServer:
          @app.websocket("/")
          async def ws_handler(self, ws: WebSocket):
              await ws.accept()
  
      serve.run(WebSocketServer.bind())
      with connect("ws://localhost:8000") as websocket:
          with pytest.raises(ConnectionClosed):
              websocket.recv()
  
file_path: ray/python/ray/serve/tests/test_websockets.py
imports: import asyncio
  import sys
  import pytest
  import requests
  from fastapi import FastAPI, WebSocket, WebSocketDisconnect
  from starlette.responses import StreamingResponse
  from websockets.exceptions import ConnectionClosed
  from websockets.sync.client import connect
  from ray import serve
label_desc: Use image node_id 3 for calling a global function with example usage: test_server_disconnect(serve_instance) without return types