code: def test_unclosed_file():
      def open():
          im = Image.open(test_file)
          im.load()
  
      with pytest.warns(ResourceWarning):
          open()
  
imports: from __future__ import annotations
  import warnings
  import pytest
  from PIL import Image, PsdImagePlugin
  from .helper import assert_image_equal_tofile, assert_image_similar, hopper, is_pypy
label_desc: Use image node_id 2 for calling a global function with example usage: test_unclosed_file() without return types