code: def test_pickle_works(self) -> None:
      arr = array("B", [0, 1, 2, 3])
  
      block = MemoryBlock(arr, copy=True)
  
      # We require pickle protocol 5 or higher since `MemoryBlock` uses
      # the `PickleBuffer` API for efficient memory sharing.
      dump = pickle.dumps(block, protocol=5)
  
      del block
  
      block = pickle.loads(dump)
  
      assert memoryview(block).tolist() == [0, 1, 2, 3]
  
file_path: fairseq2/tests/unit/test_memory.py
imports: import pickle
  from array import array
  import pytest
  from fairseq2.memory import MemoryBlock
label_desc: Use image node_id 4 for calling the TestMemoryBlock obj's underlying member method code with example usage: obj.test_pickle_works() without return types