code: def import_classes(name: str, currmodule: str) -> Any:
      """Import a class using its fully-qualified *name*."""
      target = None
  
      # import class or module using currmodule
      if currmodule:
          target = try_import(currmodule + "." + name)
  
      # import class or module without currmodule
      if target is None:
          target = try_import(name)
  
      if target is None:
          raise InheritanceException(
              "Could not import class or module %r specified for "
              "inheritance diagram" % name
          )
  
      if inspect.isclass(target):
          # If imported object is a class, just return it
          return [target]
      elif inspect.ismodule(target):
          # If imported object is a module, return classes defined on it
          return [
              cls
              for cls in target.__dict__.values()
              if inspect.isclass(cls)
              and cls.__module__ == target.__name__
          ]
      raise InheritanceException(
          "%r specified for inheritance diagram is "
          "not a class or module" % name
      )
  
imports: from __future__ import annotations
  import builtins
  import hashlib
  import inspect
  import re
  from collections.abc import Iterable, Sequence
  from importlib import import_module
  from os import path
  from typing import TYPE_CHECKING, Any, cast
  from docutils import nodes
  from docutils.parsers.rst import directives
  import sphinx
  from sphinx import addnodes
  from sphinx.ext.graphviz import figure_wrapper, graphviz, render_dot_html, render_dot_latex, render_dot_texinfo
  from sphinx.util.docutils import SphinxDirective
label_desc: Use image node_id 2 for calling a global function with example usage: import_classes(name, currmodule) and returns: list, unknown