code: def mangle_docstrings(app, what, name, obj, options, lines):
      if DEDUPLICATION_TAG in lines:
          return
  
      cfg = {
          "use_plots": app.config.numpydoc_use_plots,
          "use_blockquotes": app.config.numpydoc_use_blockquotes,
          "show_class_members": app.config.numpydoc_show_class_members,
          "show_inherited_class_members": app.config.numpydoc_show_inherited_class_members,
          "class_members_toctree": app.config.numpydoc_class_members_toctree,
      }
  
      u_NL = "\n"
      if what == "module":
          # Strip top title
          pattern = "^\\s*[#*=]{4,}\\n[a-z0-9 -]+\\n[#*=]{4,}\\s*"
          title_re = re.compile(pattern, re.I | re.S)
          lines[:] = title_re.sub("", u_NL.join(lines)).split(u_NL)
      else:
          doc = get_doc_object(
              obj,
              what,
              u_NL.join(lines),
              config=cfg,
              builder=app.builder,
          )
          doc = str(doc)
          lines[:] = doc.split(u_NL)
  
      if (
          app.config.numpydoc_edit_link
          and hasattr(obj, "__name__")
          and obj.__name__
      ):
          if hasattr(obj, "__module__"):
              v = dict(
                  full_name="{}.{}".format(obj.__module__, obj.__name__)
              )
          else:
              v = dict(full_name=obj.__name__)
          lines += ["", ".. htmlonly::", ""]
          lines += [
              "    %s" % x
              for x in (app.config.numpydoc_edit_link % v).split("\n")
          ]
  
      # call function to replace reference numbers so that there are no
      # duplicates
      rename_references(app, what, name, obj, options, lines)
  
      lines += ["..", DEDUPLICATION_TAG]
  
imports: import re
  import pydoc
  import inspect
  import collections
  import hashlib
  from docutils.nodes import citation, Text
  import sphinx
  from sphinx.addnodes import pending_xref, desc_content
  from .docscrape_sphinx import get_doc_object, SphinxDocString
  from .None import __version__
  from docutils.statemachine import ViewList
  from sphinx.domains.c import CDomain
  from sphinx.domains.python import PythonDomain
label_desc: Use image node_id 4 for calling a global function with example usage: mangle_docstrings(app, what, name, obj, options, lines) without return types