code: def for_module(
      cls: type[ModuleAnalyzer], modname: str
  ) -> ModuleAnalyzer:
      if ("module", modname) in cls.cache:
          entry = cls.cache["module", modname]
          if isinstance(entry, PycodeError):
              raise entry
          return entry
  
      try:
          filename, source = cls.get_module_source(modname)
          if source is not None:
              obj = cls.for_string(
                  source, modname, filename or "<string>"
              )
          elif filename is not None:
              obj = cls.for_file(filename, modname)
      except PycodeError as err:
          cls.cache["module", modname] = err
          raise
      cls.cache["module", modname] = obj
      return obj
  
file_path: sphinx/sphinx/pycode/__init__.py
imports: from __future__ import annotations
  import tokenize
  from importlib import import_module
  from os import path
  from typing import TYPE_CHECKING, Any
  from sphinx.errors import PycodeError
  from sphinx.pycode.parser import Parser
label_desc: Use image node_id 4 for calling the ModuleAnalyzer obj's underlying member method code with example usage: obj.for_module(cls, modname) and returns: obj, entry