code: def test_tobytes():
      # Note that this image triggers the decompression bomb warning:
      max_pixels = Image.MAX_IMAGE_PIXELS
      Image.MAX_IMAGE_PIXELS = None
  
      # Previously raised an access violation on Windows
      with Image.open("Tests/images/l2rgb_read.bmp") as im:
          with pytest.raises((ValueError, MemoryError, OSError)):
              im.tobytes()
  
      Image.MAX_IMAGE_PIXELS = max_pixels
  
imports: import sys
  import pytest
  from PIL import Image
label_desc: Use image node_id 2 for calling a global function with example usage: test_tobytes() without return types