code: def sphinx_smarty_pants(t: str, language: str = "en") -> str:
      t = t.replace("&quot;", '"')
      t = smartquotes.educateDashesOldSchool(t)
      t = smartquotes.educateQuotes(t, language)
      t = t.replace('"', "&quot;")
      return t
  
imports: from __future__ import annotations
  import html
  import os
  import re
  import time
  from os import path
  from typing import TYPE_CHECKING, Any, NamedTuple
  from urllib.parse import quote
  from zipfile import ZIP_DEFLATED, ZIP_STORED, ZipFile
  from docutils import nodes
  from docutils.utils import smartquotes
  from sphinx import addnodes
  from sphinx.builders.html import BuildInfo, StandaloneHTMLBuilder
  from sphinx.locale import __
  from sphinx.util import logging
  from sphinx.util.display import status_iterator
  from sphinx.util.fileutil import copy_asset_file
  from sphinx.util.osutil import copyfile, ensuredir, relpath
label_desc: Use image node_id 1 for calling a global function with example usage: sphinx_smarty_pants(t, language) and returns: t