class_docstr: Convert strings to dvi files using TeX, caching the results to a directory.
docstr: Return width, height and descent of the text.
code: def get_text_width_height_descent(self, tex, fontsize, renderer=None):
      """Return width, height and descent of the text."""
      if tex.strip() == "":
          return 0, 0, 0
  
      dpi_fraction = renderer.points_to_pixels(1.0) if renderer else 1
  
      if rcParams["text.latex.preview"]:
          # use preview.sty
          basefile = self.get_basefile(tex, fontsize)
          baselinefile = "%s.baseline" % basefile
  
          if not os.path.exists(baselinefile):
              dvifile = self.make_dvi_preview(tex, fontsize)
  
          with open(baselinefile) as fh:
              l = fh.read().split()
          height, depth, width = [float(l1) * dpi_fraction for l1 in l]
          return width, height + depth, depth
  
      else:
          # use dviread. It sometimes returns a wrong descent.
          dvifile = self.make_dvi(tex, fontsize)
          with dviread.Dvi(dvifile, 72 * dpi_fraction) as dvi:
              page = next(iter(dvi))
          # A total height (including the descent) needs to be returned.
          return page.width, page.height + page.descent, page.descent
  
imports: from __future__ import absolute_import, division, print_function
  import six
  import copy
  import glob
  import os
  import shutil
  import sys
  import warnings
  import logging
  from hashlib import md5
  import distutils.version
  import numpy
  import matplotlib
  from matplotlib import rcParams
  from matplotlib._png import read_png
  from matplotlib.cbook import mkdirs, Locked
  from matplotlib.compat.subprocess import subprocess, Popen, PIPE, STDOUT
  import matplotlib.dviread
  import re
label_desc: Use image node_id 16 for calling the TexManager obj's underlying member method code with example usage: obj.get_text_width_height_descent(tex, fontsize, renderer) and returns: int,  int,  int, width,  unknown,  depth, page,  unknown,  page