code: def test_invalid_rc_warning_includes_filename(caplog):
      SETTINGS = {"foo": "bar"}
      basename = "basename"
      with temp_style(basename, SETTINGS):
          # style.reload_library() in temp_style() triggers the warning
          pass
      assert (
          len(caplog.records) == 1
          and basename in caplog.records[0].getMessage()
      )
  
imports: from contextlib import contextmanager
  from pathlib import Path
  from tempfile import TemporaryDirectory
  import sys
  import numpy
  import pytest
  import matplotlib
  from matplotlib import pyplot, style
  from matplotlib.style.core import USER_LIBRARY_PATHS, STYLE_EXTENSION
label_desc: Use image node_id 2 for calling a global function with example usage: test_invalid_rc_warning_includes_filename(caplog) without return types