code: def _get_dependency_version(dep_name: str) -> str:
      # note: we import 'importlib' here as a significiant optimisation for initial import
      import importlib
      import importlib.metadata
  
      try:
          module = importlib.import_module(dep_name)
      except ImportError:
          return "<not installed>"
  
      if hasattr(module, "__version__"):
          module_version = module.__version__
      else:
          module_version = importlib.metadata.version(
              dep_name
          )  # pragma: no cover
  
      return module_version
  
imports: from __future__ import annotations
  import sys
  from polars.utils.meta import get_index_type
  from polars.utils.polars_version import get_polars_version
label_desc: Use image node_id 3 for calling a global function with example usage: _get_dependency_version(dep_name) and returns: module_version, str