code: def test_fontcache_thread_safe():
      pytest.importorskip("threading")
      import inspect
  
      proc = subprocess.run(
          [
              sys.executable,
              "-c",
              inspect.getsource(_test_threading)
              + "\n_test_threading()",
          ]
      )
      if proc.returncode:
          pytest.fail(
              "The subprocess returned with non-zero exit status "
              f"{proc.returncode}."
          )
  
imports: from io import BytesIO, StringIO
  import gc
  import multiprocessing
  import os
  from pathlib import Path
  from PIL import Image
  import shutil
  import subprocess
  import sys
  import warnings
  import numpy
  import pytest
  from matplotlib.font_manager import findfont, findSystemFonts, FontEntry, FontProperties, fontManager, json_dump, json_load, get_font, is_opentype_cff_font, MSUserFontDirectories, _get_fontconfig_fonts, ttfFontProperty
  from matplotlib import cbook, ft2font, pyplot, rc_context, figure
label_desc: Use image node_id 18 for calling a global function with example usage: test_fontcache_thread_safe() without return types