def _set_persistent_module(mod):
    conf = _get_modules_conf()
    if not os.path.exists(conf):
        __salt__['file.touch'](conf)
    mod_name = _strip_module_name(mod)
    if not mod_name or mod_name in mod_list(True) or mod_name \
            not in available():
        return set()
    escape_mod = re.escape(mod)
    # If module is commented only uncomment it
    if __salt__['file.search'](conf,
                               '^#[\t ]*{0}[\t ]*$'.format(escape_mod),
                               multiline=True):
        __salt__['file.uncomment'](conf, escape_mod)
    else:
        __salt__['file.append'](conf, mod)
    return set([mod_name])
dynamically load a class from a string
dataset/ETHPy150Open saltstack/salt/salt/modules/kmod.py/_set_persistent_module--crossover with--dataset/ETHPy150Open ckcollab/polished/polished/main.py/load_class