code: def test_missing_psfont(fmt, monkeypatch):
      """An error is raised if a TeX font lacks a Type-1 equivalent"""
      monkeypatch.setattr(
          dviread.PsfontsMap,
          "__getitem__",
          lambda self, k: dviread.PsFont(
              texname=b"texfont",
              psname=b"Some Font",
              effects=None,
              encoding=None,
              filename=None,
          ),
      )
      mpl.rcParams["text.usetex"] = True
      fig, ax = plt.subplots()
      ax.text(0.5, 0.5, "hello")
      with TemporaryFile() as tmpfile, pytest.raises(ValueError):
          fig.savefig(tmpfile, format=fmt)
  
imports: from tempfile import TemporaryFile
  import numpy
  from packaging.version import parse
  import pytest
  import matplotlib
  from matplotlib import dviread
  from matplotlib.testing import _has_tex_package
  from matplotlib.testing.decorators import check_figures_equal, image_comparison
  from matplotlib.testing._markers import needs_usetex
  import matplotlib.pyplot
label_desc: Use image node_id 10 for calling a global function with example usage: test_missing_psfont(fmt, monkeypatch) without return types