code: def autodoc_process_docstring(
      app, what: str, name: str, obj, options, lines: List[str]
  ) -> None:
      """
      Modify docstrings before creating html files.
      Sphinx converts the 'Args:' and 'Returns:' sections of docstrings into
      reStructuredText (rST) syntax, which can then be found via ':type' & ':rtype'.
  
      See here for more information:
      https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html
      """
      for i in range(len(lines)):
          # Skip unless line is an parameter doc or a return doc
          if not lines[i].startswith(":type"):
              continue
          if ":py:data:" in lines[i]:
              continue
  
          # Ensure Any, Callable, & Iterator types are hyperlinked with intersphinx.
          # The tilde '~' character hides the 'typing.' portion of the string.
          lines[i] = re.sub(
              _rt[0] + r"Any" + _rt[1], "~typing.Any", lines[i]
          )
          lines[i] = re.sub(
              _rt[0] + r"Callable" + _rt[1],
              "~typing.Callable",
              lines[i],
          )
          lines[i] = re.sub(
              _rt[0] + r"Iterator" + _rt[1],
              "~typing.Iterator",
              lines[i],
          )
          lines[i] = re.sub(
              _rt[0] + r"Iterable" + _rt[1],
              "~typing.Iterable",
              lines[i],
          )
  
          # Ensure Tensor type is hyperlinked by interpshinx
          lines[i] = re.sub(
              _rt[0] + r"Tensor" + _rt[1], "~torch.Tensor", lines[i]
          )
  
imports: import os
  import re
  import sys
  from typing import List
  import captum
label_desc: Use image node_id 1 for calling a global function with example usage: autodoc_process_docstring(app, what, name, obj, options, lines) without return types