code: def websocket_session(func: typing.Callable) -> ASGIApp:
      
      # assert asyncio.iscoroutinefunction(func), "WebSocket endpoints must be async"
  
      async def app(scope: Scope, receive: Receive, send: Send) -> None:
          session = WebSocket(scope, receive=receive, send=send)
          await func(session)
  
      return app
docs: Takes a coroutine `func(session)`, and returns an ASGI application.