code: def test_save_wrong_mode(tmp_path):
      im = hopper()
      out = str(tmp_path / "temp.xbm")
  
      with pytest.raises(OSError):
          im.save(out)
  
file_path: pillow-simd/Tests/test_file_xbm.py
imports: from io import BytesIO
  import pytest
  from PIL import Image
  from .helper import hopper
label_desc: Use image node_id 4 for calling a global function with example usage: test_save_wrong_mode(tmp_path) without return types