code: def rstjinja(app, docname, source):
      """
      Render our pages as a jinja template for fancy templating goodness.
      """
      # http://ericholscher.com/blog/2016/jul/25/integrating-jinja-rst-sphinx/
      # Make sure we're outputting HTML
      if app.builder.format != "html":
          return
      src = source[0]
      # Skip converted notebooks
      if "nbconvert_exporter" in src:
          return
      try:
          rendered = app.builder.templates.render_string(
              src, app.config.html_context
          )
          source[0] = rendered
      except Exception as exc:
          from sphinx.util import logging
  
          logger = logging.getLogger(__name__)
          logger.warning(exc)
          logger.warning(source[0])
  
file_path: statsmodels/docs/source/conf.py
imports: import contextlib
  from packaging.version import parse
  import os
  from os.path import dirname, join
  import sys
  from jinja2 import FileSystemLoader, Environment
  import yaml
  from numpydoc.xref import DEFAULT_LINKS
  from statsmodels import __version__
label_desc: Use image node_id 1 for calling a global function with example usage: rstjinja(app, docname, source) without return types