code: def linkcode_resolve(domain, info):
      """
      Determine the URL corresponding to Python object
  
      Adapted from scipy.
      """
      import sksurv
      from sksurv.util import _PropertyAvailableIfDescriptor
  
      if domain != "py":
          return None
  
      modname = info["module"]
      fullname = info["fullname"]
  
      submod = sys.modules.get(modname)
      if submod is None:
          return None
  
      obj = submod
      for part in fullname.split("."):
          try:
              obj = getattr(obj, part)
          except AttributeError:
              return None
  
      if isinstance(obj, _PropertyAvailableIfDescriptor):
          obj = obj.fget  # link to wrapped method
  
      try:
          fn = inspect.getsourcefile(obj)
      except TypeError:
          fn = None
      if fn is None and hasattr(obj, "__module__"):
          fn = inspect.getsourcefile(sys.modules[obj.__module__])
      if fn is None:
          return None
  
      try:
          source, lineno = inspect.getsourcelines(obj)
      except ValueError:
          lineno = None
  
      if lineno:
          linespec = "#L%d-L%d" % (lineno, lineno + len(source) - 1)
      else:
          linespec = ""
  
      startdir = Path(sksurv.__file__).parent.parent.absolute()
      if not fn.startswith(str(startdir)):  # not in sksurv
          return None
      fn = "/".join(Path(fn).relative_to(startdir).parts)
  
      if fn.startswith("sksurv/"):
          m = re.match(r"^.*dev[0-9]+\+g([a-f0-9]+)$", release)
          if m:
              branch = m.group(1)
          elif "dev" in release:
              branch = "master"
          else:
              branch = "v{}".format(release)
          return "https://github.com/sebp/scikit-survival/blob/{branch}/{filename}{linespec}".format(
              branch=branch, filename=fn, linespec=linespec
          )
      else:
          return None
  
file_path: scikit-survival/doc/conf.py
imports: from datetime import datetime
  from importlib.metadata import version
  import inspect
  import os
  from pathlib import Path
  import re
  import sys
  from nbconvert.preprocessors import Preprocessor
  import nbsphinx
  import sksurv
label_desc: Use image node_id 1 for calling a global function with example usage: linkcode_resolve(domain, info) and returns: None, None, None, None, str, None, None