class_docstr: Convert strings to dvi files using TeX, caching the results to a directory.
  
  The cache directory is called ``tex.cache`` and is located in the directory
  returned by `.get_cachedir`.
  
  Repeated calls to this constructor always return the same instance.
class_docstr_tok: ["Convert","strings","to","dvi","files","using","TeX",",","caching","the","results","to","a","directory",".","The","cache","directory","is","called","``","tex.cache","``","and","is","located","in","the","directory","returned","by","`",".get_cachedir","`",".","Repeated","calls","to","this","constructor","always","return","the","same","instance","."]
docstr: Return the alpha channel.
docstr_tok: ["Return","the","alpha","channel","."]
code: def get_grey(cls, tex, fontsize=None, dpi=None):
      """Return the alpha channel."""
      if not fontsize:
          fontsize = mpl.rcParams["font.size"]
      if not dpi:
          dpi = mpl.rcParams["savefig.dpi"]
      key = cls._get_tex_source(tex, fontsize), dpi
      alpha = cls._grey_arrayd.get(key)
      if alpha is None:
          pngfile = cls.make_png(tex, fontsize, dpi)
          rgba = mpl.image.imread(os.path.join(cls._texcache, pngfile))
          cls._grey_arrayd[key] = alpha = rgba[:, :, -1]
      return alpha
  
imports: import functools
  import hashlib
  import logging
  import os
  from pathlib import Path
  import subprocess
  from tempfile import TemporaryDirectory
  import numpy
  import matplotlib
  from matplotlib import _api, cbook, dviread
label_desc: Use image node_id 12 for calling the TexManager obj's underlying member method code with example usage: obj.get_grey(cls, tex, fontsize, dpi) and returns: alpha