def memory_with_blocks():
    """Set up memory with different types of memory blocks."""
    return Memory(
        token_limit=1000,
        token_flush_size=700,
        chat_history_token_ratio=0.9,
        session_id="test_blocks",
        memory_blocks=[
            TextMemoryBlock(name="text_block", priority=1),
            ContentBlocksMemoryBlock(name="content_blocks", priority=2),
            ChatMessagesMemoryBlock(name="chat_messages", priority=3),
            ComplexMemoryBlock(name="complex_block", priority=4),
            ParameterizedMemoryBlock(name="param_block", priority=5),
        ],
    )
Set up memory with different types of memory blocks.
llama-index-core/tests/memory/test_memory_blocks_base.py