def _sanitize_collection_name(self, collection_name: str) -> str:
        """
        Sanitize the collection name to remove any invalid characters.
        The unallowed characters are replaced with underscores.
        """
        # Only allow letters, digits, underscores, percentage and hyphens
        allowed_chars = set(string.ascii_letters + string.digits + "_-%")

        # Replace invalid characters with underscores
        return "".join(
            char if char in allowed_chars else "_" for char in collection_name
        )

        Sanitize the collection name to remove any invalid characters.
        The unallowed characters are replaced with underscores.
        
llama-index-integrations/storage/kvstore/llama-index-storage-kvstore-couchbase/llama_index/storage/kvstore/couchbase/base.py