code: def linkcode_resolve(domain, info):
      # try to create a corresponding github link for each source-file
      # adapted from Lasagne https://github.com/Lasagne/Lasagne/blob/master/docs/conf.py#L114
      def find_source():
          obj = sys.modules[info["module"]]
          fn = inspect.getsourcefile(obj)
          fn = os.path.relpath(fn, start="..")
          source, lineno = inspect.getsourcelines(obj)
  
          for part in info["fullname"].split("."):
              obj = getattr(obj, part)
              try:
                  fn = inspect.getsourcefile(obj)
                  fn = os.path.relpath(fn, start="..")
                  source, lineno = inspect.getsourcelines(obj)
              except TypeError:
                  break
          return fn, lineno, lineno + len(source) - 1
  
      if domain != "py" or not info["module"]:
          return None
  
      fn, line_start, line_end = find_source()
      if line_start is None:
          filename = fn
      else:
          filename = f"{fn}#L{line_start}-L{line_end}"
  
      # except Exception:
      #   filename = info['module'].replace('.', '/') + '.py'
      tag = "main" if "dev" in release else ("v" + release)
      return f"https://github.com/google-research/kubric/blob/{tag}/{filename}"
  
imports: import inspect
  import os
  import sys
  import sphinx_rtd_theme
label_desc: Use image node_id 1 for calling a global function with example usage: linkcode_resolve(domain, info) and returns: str, tag, str, filename, fn,  lineno,  unknown, None