code: def test_truncated_file(tmp_path):
      path = str(tmp_path / "temp.pgm")
      with open(path, "w") as f:
          f.write("P6")
  
      with pytest.raises(ValueError):
          with Image.open(path):
              pass
  
file_path: pillow-simd/Tests/test_file_ppm.py
imports: import sys
  from io import BytesIO
  import pytest
  from PIL import Image
  from .helper import assert_image_equal_tofile, assert_image_similar, hopper
label_desc: Use image node_id 5 for calling a global function with example usage: test_truncated_file(tmp_path) without return types