Returns a variable that available in the list of globals
969317
function nodeJsGlobalResolverFn(normalizedId) {
		var globalId = normalizedId.id;
		var x = global[globalId];
		if (!x) {
			var msg = 'Could not find global Node module [' + globalId + ']';
			throw new Error(buildMissingDepMsg(msg, globalId, Object.keys(global)));
		}
		return x;
	}
726032
protected Map<String, Object> getGlobalVariables(KnowledgeRuntimeEngine runtimeEngine) {
        Map<String, Object> globalVariables = new HashMap<String, Object>();
        if (runtimeEngine != null) {
            Globals globals = runtimeEngine.getSessionGlobals();
            if (globals != null) {
                for (String key : globals.getGlobalKeys()) {
                    Object value = globals.get(key);
                    globalVariables.put(key, value);
                }
            }
        }
        return globalVariables;
    }
1352883
function _globals (options) {
  options.hash.scope = 'global'
  return _identifiers(options).filter(function (identifier) {
    if (identifier.kind === 'external') {
      return identifier.description && identifier.description.length > 0
    } else {
      return true
    }
  })
}
328486
def global_config(cls, key, *args):
        '''  '''
        if args:
            cls.settings[key] = args[0]
        else:
            return cls.settings[key]
1291476
def _global_index():
    
    var_and_type = var + Optional(type_)
    global_dec = Suppress(upkey("global")) + index
    range_key_etc = Suppress(",") + Group(throughput) | Optional(
        Group(Suppress(",") + var_and_type).setResultsName("range_key")
    ) + Optional(Suppress(",") + include_vars) + Optional(
        Group(Suppress(",") + throughput)
    )
    global_spec = (
        Suppress("(")
        + primitive
        + Suppress(",")
        + Group(var_and_type).setResultsName("hash_key")
        + range_key_etc
        + Suppress(")")
    )
    return Group(global_dec + global_spec).setName("global index")
1084273
def global_items(self):
        """"""
        for (k, v) in self.sql('global_dump'):
            yield (self.unpack(k), self.unpack(v))
275160
def get_parent_var(name, global_ok=False, default=None, skip_frames=0):
    

    scope = get_parent_scope_from_var(name, global_ok=global_ok, skip_frames=skip_frames + 1)

    if not scope:
        return default

    if name in scope.locals:
        return scope.locals.get(name, default)

    return scope.globals.get(name, default)
885190
def find_globals_and_nonlocals(node, globs, nonlocals, code, version):
    """"""
    for n in node:
        if isinstance(n, SyntaxTree):
            globs, nonlocals = find_globals_and_nonlocals(n, globs, nonlocals,
                                                          code, version)
        elif n.kind in read_global_ops:
            globs.add(n.pattr)
        elif (version >= 3.0
              and n.kind in nonglobal_ops
              and n.pattr in code.co_freevars
              and n.pattr != code.co_name
              and code.co_name != '<lambda>'):
            nonlocals.add(n.pattr)
    return globs, nonlocals
988513
def get_global_variable(self, name):
        
        p = ffi.lib.LLVMPY_GetNamedGlobalVariable(self, _encode_string(name))
        if not p:
            raise NameError(name)
        return ValueRef(p, 'global', dict(module=self))
533435
def global_variable_action(self, text, loc, var):
        """"""
        exshared.setpos(loc, text)
        if DEBUG > 0:
            print("GLOBAL_VAR:",var)
            if DEBUG == 2: self.symtab.display()
            if DEBUG > 2: return
        index = self.symtab.insert_global_var(var.name, var.type)
        self.codegen.global_var(var.name)
        return index
515194
def variables(
            self,
            name=None,
            function=None,
            decl_type=None,
            header_dir=None,
            header_file=None,
            recursive=None,
            allow_empty=None):

        """"""
        return (
            self._find_multiple(
                self._impl_matchers[
                    scopedef_t.variable],
                name=name,
                function=function,
                decl_type=decl_type,
                header_dir=header_dir,
                header_file=header_file,
                recursive=recursive,
                allow_empty=allow_empty)
        )
73860
def get_local(self, variable_name):
        '''
        
        '''
        if variable_name not in self._locals:
            raise UnknownVariable('Unknown variable %s' % variable_name)
        return self._locals[variable_name]
1267917
def add_global_variable(*pVariable)
      pVariable.flatten.each do |element|
        next unless element.is_a?(Languages::VariableGlobalData)
        @global_variables.push(element)
      end
    end
373053
def get_global_vars(func):
    
    closure = getclosurevars(func)
    if closure['nonlocal']:
        raise TypeError("Can't launch a job with closure variables: %s" %
                        closure['nonlocals'].keys())
    globalvars = dict(modules={},
                      functions={},
                      vars={})
    for name, value in closure['global'].items():
        if inspect.ismodule(value):  # TODO: deal FUNCTIONS from closure
            globalvars['modules'][name] = value.__name__
        elif inspect.isfunction(value) or inspect.ismethod(value):
            globalvars['functions'][name] = value
        else:
            globalvars['vars'][name] = value

    return globalvars
1225116
def getvariable(name):
    """"""
    import inspect
    fr = inspect.currentframe()
    try:
        while fr:
            fr = fr.f_back
            vars = fr.f_locals
            if name in vars:
                return vars[name]
    except:
        pass
    return None
974259
def get_global(self):
        
        if self._has_global_stats:
            if self.global_num_inst == 0:
                return (self.name, float('nan'))
            else:
                return (self.name, self.global_sum_metric / self.global_num_inst)
        else:
            return self.get()
1034746
def variables(self):
    """"""
    result = []
    for _, value in sorted(self.variable_map.items()):
      if isinstance(value, list):
        result.extend(value)
      else:
        result.append(value)
    return result