code: def linkcode_resolve(domain, info):
      if domain != "py":
          return None
  
      obj = importlib.import_module(info["module"])
      source_file = Path(inspect.getsourcefile(obj))
      file_path = "/" + "/".join(info["module"].split("."))
  
      # try to get a better file path
      add_linenumbers = False
      for part in info["fullname"].split("."):
          try:
              obj = getattr(obj, part)
          except AttributeError:
              break
  
          try:
              source_file = Path(inspect.getsourcefile(obj))
          except TypeError:
              break
  
          path_elements = [source_file.name]
          for parent in source_file.parents:
              path_elements = [parent.name] + path_elements
              if parent.name == "imageio":
                  break
  
          file_path = "/".join(path_elements)
      else:
          add_linenumbers = True
  
      source_url = f"https://github.com/imageio/imageio/blob/v{imageio.__version__}/{file_path}"
  
      if add_linenumbers:
          try:
              source_lines, start = inspect.getsourcelines(obj)
          except OSError:
              pass
          else:
              end = start + len(source_lines) - 1
              source_url += f"#L{start}-L{end}"
  
      return source_url
  
file_path: imageio/docs/conf.py
imports: import sys
  import os
  import imageio
  import inspect
  import importlib
  from pathlib import Path
  import imageio.plugins.bsdf
  import imageio.plugins.dicom
  import imageio.plugins.feisem
  import imageio.plugins.fits
  import imageio.plugins.freeimage
  import imageio.plugins.gdal
  import imageio.plugins.lytro
  import imageio.plugins.npz
  import imageio.plugins.pillow_legacy
  import imageio.plugins.simpleitk
  import imageio.plugins.spe
  import imageio.plugins.swf
  from numpydoc.docscrape_sphinx import SphinxDocString
label_desc: Use image node_id 1 for calling a global function with example usage: linkcode_resolve(domain, info) and returns: source_url, None