code: def test_fonttype(fonttype):
      mpl.rcParams["ps.fonttype"] = fonttype
      fig, ax = plt.subplots()
  
      ax.text(0.25, 0.5, "Forty-two is the answer to everything!")
  
      buf = io.BytesIO()
      fig.savefig(buf, format="ps")
  
      test = (
          b"/FontType "
          + bytes(f"{fonttype}", encoding="utf-8")
          + b" def"
      )
  
      assert re.search(test, buf.getvalue(), re.MULTILINE)
  
imports: from collections import Counter
  from pathlib import Path
  import io
  import re
  import tempfile
  import numpy
  import pytest
  from matplotlib import cbook, path, patheffects, font_manager
  from matplotlib.figure import Figure
  from matplotlib.patches import Ellipse
  from matplotlib.testing._markers import needs_ghostscript, needs_usetex
  from matplotlib.testing.decorators import check_figures_equal, image_comparison
  import matplotlib
  import matplotlib.collections
  import matplotlib.colors
  import matplotlib.pyplot
label_desc: Use image node_id 16 for calling a global function with example usage: test_fonttype(fonttype) without return types