code: def test_contextmanager():
      fn = None
      with Image.open("Tests/images/hopper.gif") as im:
          fn = im.fp.fileno()
          os.fstat(fn)
  
      with pytest.raises(OSError):
          os.fstat(fn)
  
file_path: pillow/Tests/test_image_load.py
imports: from __future__ import annotations
  import logging
  import os
  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_contextmanager() without return types