code: def test_get_writer_format(tmp_path):
      with iio.get_writer(tmp_path / "test.png") as file:
          with pytest.raises(TypeError):
              file.format
  
file_path: imageio/tests/test_v2.py
imports: import pytest
  import imageio.v2
  import numpy
label_desc: Use image node_id 6 for calling a global function with example usage: test_get_writer_format(tmp_path) without return types