code: def get_version(module: types.ModuleType) -> str:
      """Get the version of a module."""
      version = getattr(module, "__version__", None)
  
      if version is None:
          raise ImportError(
              f"Can't determine version for {module.__name__}"
          )
  
      return version
  
file_path: pandas-ai/pandasai/helpers/optional.py
imports: from __future__ import annotations
  import importlib
  import sys
  import warnings
  from typing import TYPE_CHECKING
  from pandas.util.version import Version
label_desc: Use image node_id 1 for calling a global function with example usage: get_version(module) and returns: version