code: def test_partial_usetex(caplog):
      caplog.set_level("WARNING")
      plt.figtext(0.1, 0.1, "foo", usetex=True)
      plt.figtext(0.2, 0.2, "bar", usetex=True)
      plt.savefig(io.BytesIO(), format="ps")
      (record,) = caplog.records  # asserts there's a single record.
      assert "as if usetex=False" in record.getMessage()
  
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 8 for calling a global function with example usage: test_partial_usetex(caplog) without return types