drop a previously created guard on ``module_name``
        if the module is not guarded, then this is a no-op.
342880
def remove(cls, module_name):
        
        module_guards = cls._guards.get(module_name, False)
        if module_guards:
            module_guards.pop()
            cls._num_entries -= 1
            if cls._num_entries < 1:
                if cls._num_entries < 0:
                    raise Exception(
                        'Bug: ImportGuardHook._num_entries became negative!'
                    )
                cls._uninstall()
1294039
def is_module(self, name):
        """"""
        if self.module_prefix.startswith(self.mount_prefix):
            return name.startswith(self.module_prefix)
        return name.startswith(self.module_prefix) and not name.startswith(self.mount_prefix)
316231
def _remove_persistent_module(mod, comment):
    '''
    
    '''
    conf = _get_modules_conf()
    mod_name = _strip_module_name(mod)
    if not mod_name or mod_name not in mod_list(True):
        return set()
    escape_mod = re.escape(mod)
    if comment:
        __salt__['file.comment'](conf, '^[\t ]*{0}[\t ]?'.format(escape_mod))
    else:
        __salt__['file.sed'](conf, '^[\t ]*{0}[\t ]?'.format(escape_mod), '')
    return set([mod_name])
392726
function unloadModule (module) {
    var found_module = false;

    registered_modules = _.reject(registered_modules, function (registered_module) {
        if (module.toLowerCase() === registered_module.module_name.toLowerCase()) {
            found_module = true;

            registered_module.dispose();
            return true;
        }
    });

    return found_module;
}
486215
def is_submodule(self, name):
        
        return self.name != name and name.startswith(self.name)
1097319
def module_del(self, key):
        
        if key in self._module_event_map:
            del self._module_event_map[key]
        if key in self._watch_modules.names:
            self._watch_modules.remove(key)
678536
def safe_import_module(module_name):
    
    try:
        return import_module(module_name)
    except ImportError as e:
        m = re.match(r"No module named '([\w\.]+)'", str(e))
        if not m or not module_name.startswith(m.group(1)):
            raise e
169097
def unload(module):
    '''
    
    '''
    ret = {}
    fmadm = _check_fmadm()
    cmd = '{cmd} unload {module}'.format(
        cmd=fmadm,
        module=module
    )
    res = __salt__['cmd.run_all'](cmd)
    retcode = res['retcode']
    result = {}
    if retcode != 0:
        result['Error'] = res['stderr']
    else:
        result = True

    return result
1008464
function unregisterOperator( $op_name )
    {
        if ( is_array( $op_name ) )
        {
            foreach ( $op_name as $op )
            {
                $this->unregisterOperator( $op_name );
            }
        }
        else if ( isset( $this->Operators ) )
            unset( $this->Operators[$op_name] );
        else
            $this->warning( "unregisterOpearator()", "Operator $op_name is not registered, cannot unregister" );
    }
1131579
function dive(name) {
		// check if this module has already been 
		// processed in case of circular dependency
		if (dive[name]) {
			return;
		}
		dive[name] = true;
		dive.required.push(name);

		var deps = allModules[name] || [];
		deps.forEach(function (item) {
			dive(item);
		});
	}
894951
def reset(module, serd=None):
    '''
    
    '''
    ret = {}
    fmadm = _check_fmadm()
    cmd = '{cmd} reset {serd}{module}'.format(
        cmd=fmadm,
        serd='-s {0} '.format(serd) if serd else '',
        module=module
    )
    res = __salt__['cmd.run_all'](cmd)
    retcode = res['retcode']
    result = {}
    if retcode != 0:
        result['Error'] = res['stderr']
    else:
        result = True

    return result
535786
def _disable_module(module):
        """"""
        try:
            subprocess.check_call(['a2dismod', module])
        except subprocess.CalledProcessError as e:
            # Note: catch error here to allow the attempt of disabling
            # multiple modules in one go rather than failing after the
            # first module fails.
            log('Error occurred disabling module %s. '
                'Output is: %s' % (module, e.output), level=ERROR)
1076719
def import_name(mod_name):
    
    try:
        mod_obj_old = sys.modules[mod_name]
    except KeyError:
        mod_obj_old = None

    if mod_obj_old is not None:
        return mod_obj_old

    __import__(mod_name)

    mod_obj = sys.modules[mod_name]

    return mod_obj
952910
def is_builtin_module(module_name):
    """"""
    module_name = module_name.split(".")[0]
    return (module_name in MODULES or
            (module_name in cxx_keywords and module_name + "_" in MODULES))
967249
def remove_global(self, name):
        
        with self._lock:
            if self._gpayload is not None:
                if name in self._gpayload:
                    del self._gpayload[name]
                if not self._gpayload:
                    self._gpayload = None
1032639
def reload_inasafe_modules(module_name=None):
    

    if not module_name:
        module_name = 'safe'
    list_modules = list(sys.modules.keys())
    for module in list_modules:
        if not sys.modules[module]:
            continue
        if module.startswith(module_name):
            del sys.modules[module]
450177
function guard(value) {
  return value == null || (Array.isArray(value) && value.length === 0) ? '' : value;
}