def METHOD_NAME():
    @asynccontextmanager
    async def _backend_invited_ws_factory(
        backend_asgi_app,
        organization_id: OrganizationID,
        invitation_type: InvitationType,
        token: InvitationToken,
    ):
        client = backend_asgi_app.test_client()
        async with client.websocket("/ws") as ws:
            ch = InvitedClientHandshake(
                organization_id=organization_id, invitation_type=invitation_type, token=token
            )
            challenge_req = await ws.receive()
            answer_req = ch.process_challenge_req(challenge_req)
            await ws.send(answer_req)
            result_req = await ws.receive()
            ch.process_result_req(result_req)
            yield ws
    return _backend_invited_ws_factory