code: def _setup_numpy_typing():
      try:
          import numpy as np
      except ImportError:
          from types import new_class
          from typing import Generic, TypeVar
  
          np = type(sys)("numpy")
          sys.modules[np.__name__] = np
          np.dtype = new_class("dtype", (Generic[TypeVar("T")],))
          np.dtype.__module__ = np.__name__
  
      try:
          import numpy.typing as npt
      except ImportError:
          npt = type(sys)("numpy.typing")
          np.typing = npt
          sys.modules[npt.__name__] = npt
          npt.__all__ = []
          for attr in ["ArrayLike", "DTypeLike"]:
              setattr(npt, attr, typing.Any)
              npt.__all__.append(attr)
  
file_path: mpi4py/docs/source/conf.py
imports: import os
  import sys
  import typing
  import datetime
  import importlib
label_desc: Use image node_id 2 for calling a global function with example usage: _setup_numpy_typing() without return types