code: def linkcode_resolve(domain, info):
      def find_source():
          # try to find the file and line number, based on code from numpy:
          # https://github.com/numpy/numpy/blob/master/doc/source/conf.py#L286
          obj = sys.modules[info["module"]]
          for part in info["fullname"].split("."):
              obj = getattr(obj, part)
          fname = inspect.getsourcefile(obj)
          # https://github.com/rtfd/readthedocs.org/issues/5735
          if any(
              s in fname for s in ("readthedocs", "rtfd", "checkouts")
          ):
              # /home/docs/checkouts/readthedocs.org/user_builds/pytorch_lightning/checkouts/
              #  devel/pytorch_lightning/utilities/cls_experiment.py#L26-L176
              path_top = os.path.abspath(os.path.join("..", "..", ".."))
              fname = os.path.relpath(fname, start=path_top)
          else:
              # Local build, imitate master
              fname = "master/" + os.path.relpath(
                  fname, start=os.path.abspath("..")
              )
          source, lineno = inspect.getsourcelines(obj)
          return fname, lineno, lineno + len(source) - 1
  
      if domain != "py" or not info["module"]:
          return None
      try:
          filename = "%s#L%d-L%d" % find_source()
      except Exception:
          filename = info["module"].replace(".", "/") + ".py"
      # import subprocess
      # tag = subprocess.Popen(['git', 'rev-parse', 'HEAD'], stdout=subprocess.PIPE,
      #                        universal_newlines=True).communicate()[0][:-1]
      branch = filename.split("/")[0]
      # do mapping from latest tags to master
      branch = {"latest": "master", "stable": "master"}.get(
          branch, branch
      )
      filename = "/".join([branch] + filename.split("/")[1:])
      return f"https://github.com/{github_user}/{github_repo}/blob/{filename}"
  
file_path: pytorch-lightning/docs/source-app/conf.py
imports: import glob
  import inspect
  import os
  import shutil
  import sys
  import lai_sphinx_theme
  from lightning_utilities.docs import fetch_external_assets
  import lightning
label_desc: Use image node_id 3 for calling a global function with example usage: linkcode_resolve(domain, info) and returns: str, github_user, str, github_repo, str, filename, fname,  lineno,  unknown, None