code: def test_font_selection(rc, preamble, family):
      plt.rcParams.update(rc)
      tm = TexManager()
      src = Path(tm.make_tex("hello, world", fontsize=12)).read_text()
      assert preamble in src
      assert [*re.findall(r"\\\w+family", src)] == [family]
  
file_path: matplotlib/lib/matplotlib/tests/test_texmanager.py
imports: import os
  from pathlib import Path
  import re
  import subprocess
  import sys
  import matplotlib.pyplot
  from matplotlib.texmanager import TexManager
  from matplotlib.testing._markers import needs_usetex
  import pytest
label_desc: Use image node_id 2 for calling a global function with example usage: test_font_selection(rc, preamble, family) without return types