Return the functions and the returners loaded up from the loader
        module
763748
def _load_modules(self, force_refresh=False, notify=False, grains=None, opts=None):
        '''
        
        '''
        opt_in = True
        if not opts:
            opts = self.opts
            opt_in = False
        # if this is a *nix system AND modules_max_memory is set, lets enforce
        # a memory limit on module imports
        # this feature ONLY works on *nix like OSs (resource module doesn't work on windows)
        modules_max_memory = False
        if opts.get('modules_max_memory', -1) > 0 and HAS_PSUTIL and HAS_RESOURCE:
            log.debug(
                'modules_max_memory set, enforcing a maximum of %s',
                opts['modules_max_memory']
            )
            modules_max_memory = True
            old_mem_limit = resource.getrlimit(resource.RLIMIT_AS)
            rss, vms = psutil.Process(os.getpid()).memory_info()[:2]
            mem_limit = rss + vms + opts['modules_max_memory']
            resource.setrlimit(resource.RLIMIT_AS, (mem_limit, mem_limit))
        elif opts.get('modules_max_memory', -1) > 0:
            if not HAS_PSUTIL:
                log.error('Unable to enforce modules_max_memory because psutil is missing')
            if not HAS_RESOURCE:
                log.error('Unable to enforce modules_max_memory because resource is missing')

        # This might be a proxy minion
        if hasattr(self, 'proxy'):
            proxy = self.proxy
        else:
            proxy = None

        if grains is None:
            opts['grains'] = salt.loader.grains(opts, force_refresh, proxy=proxy)
        self.utils = salt.loader.utils(opts, proxy=proxy)

        if opts.get('multimaster', False):
            s_opts = copy.deepcopy(opts)
            functions = salt.loader.minion_mods(s_opts, utils=self.utils, proxy=proxy,
                                                loaded_base_name=self.loaded_base_name, notify=notify)
        else:
            functions = salt.loader.minion_mods(opts, utils=self.utils, notify=notify, proxy=proxy)
        returners = salt.loader.returners(opts, functions, proxy=proxy)
        errors = {}
        if '_errors' in functions:
            errors = functions['_errors']
            functions.pop('_errors')

        # we're done, reset the limits!
        if modules_max_memory is True:
            resource.setrlimit(resource.RLIMIT_AS, old_mem_limit)

        executors = salt.loader.executors(opts, functions, proxy=proxy)

        if opt_in:
            self.opts = opts

        return functions, returners, errors, executors
1138328
def get_plugins(modules, classobj):
    
    for module in modules:
        for plugin in get_module_plugins(module, classobj):
            yield plugin
512231
def outputters(opts):
    '''
    
    '''
    ret = LazyLoader(
        _module_dirs(opts, 'output', ext_type_dirs='outputter_dirs'),
        opts,
        tag='output',
    )
    wrapped_ret = FilterDictWrapper(ret, '.output')
    # TODO: this name seems terrible... __salt__ should always be execution mods
    ret.pack['__salt__'] = wrapped_ret
    return wrapped_ret
163703
def inspect_functions(self):
        
        if not self._inspect_functions:
            d = {}
            for m in self.inspect_members:
                if issubclass(m, AWSHelperFn):
                    d[m.__name__] = m

            TemplateGenerator._inspect_functions = d

        return self._inspect_functions
1205758
def load_modules(self, data=None, proxy=None):
        '''
        
        '''
        self.functions = self.wrapper
        self.utils = salt.loader.utils(self.opts)
        self.serializers = salt.loader.serializers(self.opts)
        locals_ = salt.loader.minion_mods(self.opts, utils=self.utils)
        self.states = salt.loader.states(self.opts, locals_, self.utils, self.serializers)
        self.rend = salt.loader.render(self.opts, self.functions)
357964
def functions(self):
        
        return [x for x in self[self.current_scope].values() if x.class_ in
                (CLASS.function, CLASS.sub)]
710409
def load_modules(self, args):
        """"""

        # Init the plugins dict
        # Active plugins dictionnary
        self._plugins = collections.defaultdict(dict)
        # Load the plugins
        self.load_plugins(args=args)

        # Init the export modules dict
        # Active exporters dictionnary
        self._exports = collections.defaultdict(dict)
        # All available exporters dictionnary
        self._exports_all = collections.defaultdict(dict)
        # Load the export modules
        self.load_exports(args=args)

        # Restoring system path
        sys.path = sys_path
392611
def module_functions(modulestr):
    

    funcs = dict(inspect.getmembers(import_module(modulestr),
                 inspect.isfunction))

    return OrderedDict(sorted(funcs.items(), key=lambda f: f[0]))
852522
def get_loaded_modules(modules):
    ''''''

    _modules = []
    for mod in modules:
        mod_cfg = get_conf_from_module(mod)

        _modules.append((mod, mod_cfg,))

    _modules = sorted(_modules, key=lambda m: m[1].get('ordering'))

    return _modules
347988
def functions(self):
        
        it = ffi.lib.LLVMPY_ModuleFunctionsIter(self)
        return _FunctionsIterator(it, dict(module=self))
616150
def get_plugin_classes(modules):
    """"""
    classes = (_ConnectionPlugin, _ContentPlugin, _ParserPlugin)
    return loader.get_plugins(modules, classes)
111278
def gen_modules(self, initial_load=False):
        '''
        
        '''
        self.opts['pillar'] = salt.pillar.get_pillar(
            self.opts,
            self.opts['grains'],
            self.opts['id'],
            self.opts['saltenv'],
            pillarenv=self.opts.get('pillarenv'),
        ).compile_pillar()

        self.utils = salt.loader.utils(self.opts)
        self.functions = salt.loader.minion_mods(self.opts, utils=self.utils)
        self.serializers = salt.loader.serializers(self.opts)
        self.returners = salt.loader.returners(self.opts, self.functions)
        self.proxy = salt.loader.proxy(self.opts, self.functions, self.returners, None)
        # TODO: remove
        self.function_errors = {}  # Keep the funcs clean
        self.states = salt.loader.states(self.opts,
                self.functions,
                self.utils,
                self.serializers)
        self.rend = salt.loader.render(self.opts, self.functions)
#        self.matcher = Matcher(self.opts, self.functions)
        self.matchers = salt.loader.matchers(self.opts)
        self.functions['sys.reload_modules'] = self.gen_modules
        self.executors = salt.loader.executors(self.opts)
923354
def func_load(code, defaults=None, closure=None, globs=None):
    
    if isinstance(code, (tuple, list)):  # unpack previous dump
        code, defaults, closure = code
    code = marshal.loads(code)
    if closure is not None:
        closure = func_reconstruct_closure(closure)
    if globs is None:
        globs = globals()
    return types.FunctionType(code, globs, name=code.co_name, argdefs=defaults, closure=closure)
488775
function getModule(name, loader) {
    var exports;
    var entry = loader.defined[name];

    if (!entry) {
      exports = loader.get(name);
      if (!exports)
        throw new Error('Unable to load dependency ' + name + '.');
    }

    else {
      if (entry.declarative)
        ensureEvaluated(name, entry, [], loader);
    
      else if (!entry.evaluated)
        linkDynamicModule(entry, loader);

      exports = entry.module.exports;
    }

    if ((!entry || entry.declarative) && exports && exports.__useDefault)
      return exports['default'];
    
    return exports;
  }
1010547
def get_functions(self, include_meta=False):
        
        instances = self._get_instances(ast.FunctionDef)
        instances = [
            PyFunction(instance, self.full_package)  # fix package name
            for instance in instances
        ]

        if not include_meta:
            instances = [
                instance  # fix package name
                for instance in instances
                if not instance.get_name().startswith("__")
            ]

        return instances
1189842
def build_funcs(modules):
        
        kernel32 = ['kernel32_']
        try:
            kernel32 += remove_dups(modules['kernel32'])
        except KeyError:
            if len(modules) and 'LoadLibraryA' not in kernel32:
                kernel32.insert(1, 'LoadLibraryA')
        if len(modules) > 1 and 'LoadLibraryA' not in kernel32:
            kernel32.insert(1, 'LoadLibraryA')
        if 'GetProcAddress' not in kernel32:
            kernel32.insert(1, 'GetProcAddress')
        logging.debug('kernel32: %s', kernel32)
        for module, funcs in modules.items():
            logging.debug('%s: %s', module, funcs)
            if module != 'kernel32':
                kernel32.extend([module + '_'] + remove_dups(funcs))
        return kernel32
121130
def functions(self):
        
        out = {}
        for key in self._func_names:
            out[key[len(self._prefix):]] = getattr(self, key)
        return out