async def METHOD_NAME(socket_id: SocketID, app: web.Application) -> None:
    """socketio reserved handler for when the socket.io connection is disconnected."""
    sio = get_socket_server(app)
    async with sio.session(socket_id) as socketio_session:
        if user_id := socketio_session.get("user_id"):
            client_session_id = socketio_session["client_session_id"]
            with log_context(
                _logger,
                logging.INFO,
                "disconnection of %s for %s",
                f"{user_id=}",
                f"{client_session_id=}",
            ):
                with managed_resource(user_id, client_session_id, app) as user_session:
                    await user_session.remove_socket_id()
                # signal same user other clients if available
                await emit(
                    app, "SIGNAL_USER_DISCONNECTED", user_id, client_session_id, app
                )
        else:
            # this should not happen!!
            _logger.error(
                "Unknown client diconnected sid: %s, session %s",
                socket_id,
                f"{socketio_session}",
            )