code: def get_attributes(item, obj, modulename):
      """Filters attributes to be used in autosummary.
      Fixes import errors when documenting inherited attributes with autosummary.
      """
      module = import_module(modulename)
      if hasattr(getattr(module, obj), item):
          return f"~{obj}.{item}"
      else:
          return ""
  
file_path: avalanche/docs/conf.py
imports: import os
  import sys
  import pkgutil
  from importlib import import_module
  from typing import Any
  from jinja2.filters import FILTERS
  from sphinx.ext.coverage import CoverageBuilder
  import avalanche
  import inspect
  import pkgutil
label_desc: Use image node_id 3 for calling a global function with example usage: get_attributes(item, obj, modulename) and returns: str, obj, str, item, str