code: def test_cannot_save_wrong_mode(tmp_path):
      # Arrange
      im = hopper()
      filename = str(tmp_path / "temp.msp")
  
      # Act/Assert
      with pytest.raises(OSError):
          im.save(filename)
  
file_path: pillow/Tests/test_file_msp.py
imports: from __future__ import annotations
  import os
  import pytest
  from PIL import Image, MspImagePlugin
  from .helper import assert_image_equal, assert_image_equal_tofile, hopper
label_desc: Use image node_id 8 for calling a global function with example usage: test_cannot_save_wrong_mode(tmp_path) without return types