def test_pickle() -> None:
    """Unpickleable tiktoken tokenizer should be circumvented when pickling."""
    memory = ChatSummaryMemoryBuffer.from_defaults()
    bytes_ = pickle.dumps(memory)
    assert isinstance(pickle.loads(bytes_), ChatSummaryMemoryBuffer)
Unpickleable tiktoken tokenizer should be circumvented when pickling.
llama-index-core/tests/memory/test_chat_summary_memory_buffer.py