code: def _get_full_modname(modname: str, attribute: str) -> str | None:
      try:
          if modname is None:
              # Prevents a TypeError: if the last getattr() call will return None
              # then it's better to return it directly
              return None
          module = import_module(modname)
  
          # Allow an attribute to have multiple parts and incidentally allow
          # repeated .s in the attribute.
          value = module
          for attr in attribute.split("."):
              if attr:
                  value = getattr(value, attr)
  
          return getattr(value, "__module__", None)
      except AttributeError:
          # sphinx.ext.viewcode can't follow class instance attribute
          # then AttributeError logging output only verbose mode.
          logger.verbose("Didn't find %s in %s", attribute, modname)
          return None
      except Exception as e:
          # sphinx.ext.viewcode follow python domain directives.
          # because of that, if there are no real modules exists that specified
          # by py:function or other directives, viewcode emits a lot of warnings.
          # It should be displayed only verbose mode.
          logger.verbose(traceback.format_exc().rstrip())
          logger.verbose(
              'viewcode can\'t import %s, failed with error "%s"',
              modname,
              e,
          )
          return None
  
imports: from __future__ import annotations
  import posixpath
  import traceback
  from importlib import import_module
  from os import path
  from typing import TYPE_CHECKING, Any, cast
  from docutils import nodes
  from docutils.nodes import Element, Node
  import sphinx
  from sphinx import addnodes
  from sphinx.builders.html import StandaloneHTMLBuilder
  from sphinx.locale import _, __
  from sphinx.pycode import ModuleAnalyzer
  from sphinx.transforms.post_transforms import SphinxPostTransform
  from sphinx.util import logging
  from sphinx.util.display import status_iterator
  from sphinx.util.nodes import make_refnode
label_desc: Use image node_id 1 for calling a global function with example usage: _get_full_modname(modname, attribute) and returns: getattr, None, None, None