code: def test_freeimage_lib(setup_library):
      fi = imageio.plugins.freeimage.fi
  
      # Error messages
      imageio.plugins._freeimage.fi._messages.append("this is a test")
      assert imageio.plugins._freeimage.fi.get_output_log()
      imageio.plugins._freeimage.fi._show_any_warnings()
      imageio.plugins._freeimage.fi._get_error_message()
  
      # Test getfif
      raises(
          ValueError, fi.getFIF, "foo.png", "x"
      )  # mode must be r or w
      raises(ValueError, fi.getFIF, "foo.notvalid", "w")  # invalid ext
      raises(ValueError, fi.getFIF, "foo.iff", "w")
  
imports: import os
  import shutil
  import sys
  import platform
  import warnings
  import fsspec
  import imageio.plugins
  import imageio.v3
  import imageio.v2
  import numpy
  import pytest
  from imageio import core
  from imageio.core import IS_PYPY
  from pytest import raises
  from conftest import deprecated_test
label_desc: Use image node_id 9 for calling a global function with example usage: test_freeimage_lib(setup_library) without return types