code: def temp_style(style_name, settings=None):
      """Context manager to create a style sheet in a temporary directory."""
      if not settings:
          settings = DUMMY_SETTINGS
      temp_file = f"{style_name}.{STYLE_EXTENSION}"
      try:
          with TemporaryDirectory() as tmpdir:
              # Write style settings to file in the tmpdir.
              Path(tmpdir, temp_file).write_text(
                  "\n".join(f"{k}: {v}" for k, v in settings.items()),
                  encoding="utf-8",
              )
              # Add tmpdir to style path and reload so we can access this style.
              USER_LIBRARY_PATHS.append(tmpdir)
              style.reload_library()
              yield
      finally:
          style.reload_library()
  
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 1 for calling a global function with example usage: temp_style(style_name, settings) without return types