code: def register_source(app, env, modname):
      """
      Registers source code.
  
      :param app: application
      :param env: environment of the plugin
      :param modname: name of the module to load
      :return: True if the code is registered successfully, False otherwise
      """
      entry = env._viewcode_modules.get(modname, None)
      if entry is False:
          print(f"[{modname}] Entry is false for ")
          return False
  
      code_tags = app.emit_firstresult("viewcode-find-source", modname)
      if code_tags is None:
          try:
              analyzer = ModuleAnalyzer.for_module(modname)
          except Exception as ex:
              logger.info(
                  'Module "%s" could not be loaded. Full source will not be available. "%s"',
                  modname,
                  ex,
              )
              # We cannot use regular warnings or exception methods because those warnings are interpreted
              # by running python process and converted into "real" warnings, so we need to print the
              # traceback here at info level
              tb = traceback.format_exc()
              logger.info("%s", tb)
              env._viewcode_modules[modname] = False
              return False
  
          if not isinstance(analyzer.code, str):
              code = analyzer.code.decode(analyzer.encoding)
          else:
              code = analyzer.code
  
          analyzer.find_tags()
          tags = analyzer.tags
  
      else:
          code, tags = code_tags
  
      if entry is None or entry[0] != code:
          entry = code, tags, {}, ""
          env._viewcode_modules[modname] = entry
  
      return True
  
imports: from __future__ import annotations
  import os
  import traceback
  from docutils import nodes
  from docutils.parsers.rst import directives
  from sphinx.directives.code import LiteralIncludeReader
  from sphinx.ext.viewcode import viewcode_anchor
  from sphinx.locale import _
  from sphinx.pycode import ModuleAnalyzer
  from sphinx.util import logging, parselinenos
  from sphinx.util.docutils import SphinxDirective
  from sphinx.util.nodes import set_source_info
label_desc: Use image node_id 1 for calling a global function with example usage: register_source(app, env, modname) and returns: True, False, False