def module(name, module_state='Enabled', version='any'):
    ret = {'name': name,
           'result': True,
           'comment': '',
           'changes': {}}
    modules = __salt__['selinux.list_semod']()
    if name not in modules:
        ret['comment'] = 'Module {0} is not available'.format(name)
        ret['result'] = False
        return ret
    rmodule_state = _refine_module_state(module_state)
    if rmodule_state == 'unknown':
        ret['comment'] = '{0} is not a valid state for the ' \
                         '{1} module.'.format(module_state, module)
        ret['result'] = False
        return ret
    if version != 'any':
        installed_version = modules[name]['Version']
        if not installed_version == version:
            ret['comment'] = 'Module version is {0} and does not match ' \
                             'the desired version of {1}'.format(installed_version, version)
            ret['result'] = False
            return ret
    current_module_state = _refine_module_state(modules[name]['Enabled'])
    if rmodule_state == current_module_state:
        ret['comment'] = 'Module {0} is in the desired state'.format(name)
        return ret
    if __opts__['test']:
        ret['result'] = None
        ret['comment'] = 'Module {0} is set to be togggled to {1}'.format(
            name, module_state)
        return ret

    if __salt__['selinux.setsemod'](name, rmodule_state):
        ret['comment'] = 'Module {0} has been set to {1}'.format(name, module_state)
        return ret
    ret['result'] = False
    ret['comment'] = 'Failed to set the Module {0} to {1}'.format(name, module_state)
    return ret
Add to context the version numbers of relevant apps.
dataset/ETHPy150Open saltstack/salt/salt/states/selinux.py/module--crossover with--dataset/ETHPy150Open shtalinberg/django-el-pagination/tests/project/context_processors.py/versions