class_docstr: Convert strings to dvi files using TeX, caching the results to a directory.
docstr: Generate a dvi file containing latex's layout of tex string.
  
  Return the file name.
code: def make_dvi(self, tex, fontsize):
      """
      Generate a dvi file containing latex's layout of tex string.
  
      Return the file name.
      """
  
      if rcParams["text.latex.preview"]:
          return self.make_dvi_preview(tex, fontsize)
  
      basefile = self.get_basefile(tex, fontsize)
      dvifile = "%s.dvi" % basefile
      if not os.path.exists(dvifile):
          texfile = self.make_tex(tex, fontsize)
          with Locked(self.texcache):
              self._run_checked_subprocess(
                  [
                      "latex",
                      "-interaction=nonstopmode",
                      "--halt-on-error",
                      texfile,
                  ],
                  tex,
              )
          for fname in glob.glob(basefile + "*"):
              if not fname.endswith(("dvi", "tex")):
                  try:
                      os.remove(fname)
                  except OSError:
                      pass
  
      return dvifile
  
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 9 for calling the TexManager obj's underlying member method code with example usage: obj.make_dvi(tex, fontsize) and returns: dvifile, self