def get_module_version(module):
    """
    Retrieve __version__ variable from an imported module.

    @param module: The module instance.
    @type module: module
    @return: The version hash without the surrounding text. If not present
        return None.
    @rtype: str or None
    """
    if hasattr(module, '__version__'):
        return module.__version__[5:-1]
