code: def setup(app):
      _setup_numpy_typing()
      _patch_domain_python()
      _setup_autodoc(app)
  
      try:
          from mpi4py import MPI
      except ImportError:
          autodoc_mock_imports.append("mpi4py")
          return
  
      sys_dwb = sys.dont_write_bytecode
      sys.dont_write_bytecode = True
      import apidoc
  
      sys.dont_write_bytecode = sys_dwb
  
      name = MPI.__name__
      here = os.path.abspath(os.path.dirname(__file__))
      outdir = os.path.join(here, apidoc.OUTDIR)
      source = os.path.join(outdir, f"{name}.py")
      getmtime = os.path.getmtime
      generate = (
          not os.path.exists(source)
          or getmtime(source) < getmtime(MPI.__file__)
          or getmtime(source) < getmtime(apidoc.__file__)
      )
      if generate:
          apidoc.generate(source)
      module = apidoc.load_module(source)
      apidoc.replace_module(module)
  
      synopsis = autosummary_context["synopsis"]
      synopsis[module.__name__] = module.__doc__.strip()
      autotype = autosummary_context["autotype"]
      autotype[module.Exception.__name__] = "exception"
  
      modules = [
          "mpi4py",
          "mpi4py.run",
          "mpi4py.util.dtlib",
          "mpi4py.util.pkl5",
      ]
      typing_overload = typing.overload
      typing.overload = lambda arg: arg
      for name in modules:
          mod = importlib.import_module(name)
          ann = apidoc.load_module(f"{mod.__file__}i", name)
          apidoc.annotate(mod, ann)
      typing.overload = typing_overload
  
file_path: mpi4py/docs/source/conf.py
imports: import os
  import sys
  import typing
  import datetime
  import importlib
label_desc: Use image node_id 5 for calling a global function with example usage: setup(app) without return types