code: def latex2html(node, source):
      inline = isinstance(node.parent, nodes.TextElement)
      latex = node["latex"]
      name = "math-%s" % hashlib.md5(latex.encode()).hexdigest()[-10:]
  
      destdir = os.path.join(
          setup.app.builder.outdir, "_images", "mathmpl"
      )
      if not os.path.exists(destdir):
          os.makedirs(destdir)
      dest = os.path.join(destdir, "%s.png" % name)
      path = "/".join((setup.app.builder.imgpath, "mathmpl"))
  
      depth = latex2png(latex, dest, node["fontset"])
  
      if inline:
          cls = ""
      else:
          cls = 'class="center" '
      if inline and depth != 0:
          style = 'style="position: relative; bottom: -%dpx"' % (
              depth + 1
          )
      else:
          style = ""
  
      return '<img src="%s/%s.png" %s%s/>' % (path, name, cls, style)
  
file_path: catboost/contrib/python/matplotlib/py2/matplotlib/sphinxext/mathmpl.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import six
  import hashlib
  import os
  import sys
  import warnings
  from docutils import nodes
  from docutils.parsers.rst import directives
  import sphinx
  from matplotlib import rcParams
  from matplotlib.mathtext import MathTextParser
label_desc: Use image node_id 5 for calling a global function with example usage: latex2html(node, source) and returns: unknown