code: def getdocstr(mc, docstrings, namespace=None):
      name = getattr(mc, "__name__", None)
      if name is None:
          return
      if name in ("__builtin__", "builtins"):
          return
      if namespace:
          name = f"{namespace}.{name}"
      if type(mc) in (
          ModuleType,
          ClassType,
      ):
          doc = getattr(mc, "__doc__", None)
          if doc == "<undocumented>":
              return
          docstrings[name] = doc
          for k, v in vars(mc).items():
              if isinstance(v, (classmethod, staticmethod)):
                  v = v.__get__(mc)
              getdocstr(v, docstrings, name)
      elif type(mc) in (
          FunctionType,
          StaticMethodType,
          ClassMethodType,
          MethodDescrType,
          GetSetDescrType,
      ):
          doc = getattr(mc, "__doc__", None)
          if doc == "<undocumented>":
              return
          if doc is not None:
              sig, _, doc = doc.partition("\n")
          docstrings[name] = doc
  
imports: from mpi4py import MPI
  import mpiunittest
  import sys
label_desc: Use image node_id 1 for calling a global function with example usage: getdocstr(mc, docstrings, namespace) without return types