code: def __get_mod_version(modname):
      try:
          if modname in sys.modules:
              mod = sys.modules[modname]
          else:
              mod = importlib.import_module(modname)
          try:
              return mod.__version__
          except AttributeError:
              return "installed, no version number available"
  
      except ImportError:
          return None
  
imports: import sys
  import importlib
label_desc: Use image node_id 1 for calling a global function with example usage: __get_mod_version(modname) and returns: mod, None, str