def get_module_version(module_name):
 mod = __import__(module_name)
 return getattr(mod, '__version__', getattr(mod, 'VERSION', None))

def get_module_version ( module_name ) : mod = __import__ ( module_name ) return getattr ( mod , '__version__' , getattr ( mod , 'VERSION' , None ) )
return module version or none if version cant be retrieved .