def METHOD_NAME(make_async):
    """Declare namespaces for SocketIO and init the SocketIO WSGI/ASGI app."""
    server_class = AsyncServer if make_async else socketio.Server
    async_mode = "asgi" if make_async else "threading"
    namespace_class = AsyncNamespace if make_async else Namespace
    sio = server_class(async_mode=async_mode, cors_allowed_origins="*")
    for namespace in SOCKET_IO_NAMESPACES:
        sio.register_namespace(namespace_class(namespace))
    register_sio_server(sio)
    return sio