code: def test_set_blocks_max(self):
      for i in [0, 1, 10]:
          Image.core.set_blocks_max(i)
          blocks_max = Image.core.get_blocks_max()
          assert blocks_max == i
  
          # Try to construct new image
          Image.new("RGB", (10, 10))
  
      with pytest.raises(ValueError):
          Image.core.set_blocks_max(-1)
      if sys.maxsize < 2**32:
          with pytest.raises(ValueError):
              Image.core.set_blocks_max(2**29)
  
imports: import sys
  import pytest
  from PIL import Image
  from .helper import is_pypy
label_desc: Use image node_id 8 for calling the TestCoreMemory obj's underlying member method code with example usage: obj.test_set_blocks_max() without return types