Get the local field (search for it) from the scope stack. An alias
        for ``get_var``

        :name: The name of the local field
544836
def get_local(self, name, recurse=True):
        
        self._dlog("getting local '{}'".format(name))
        return self._search("vars", name, recurse)
808719
def lookup(var_name, contexts=(), start=0):
    
    start = len(contexts) if start >=0 else start
    for context in reversed(contexts[:start]):
        try:
            if var_name in context:
                return context[var_name]
        except TypeError as te:
            # we may put variable on the context, skip it
            continue
    return None
873241
def _get_var_from_string(item):
    
    modname, varname = _split_mod_var_names(item)
    if modname:
        mod = __import__(modname, globals(), locals(), [varname], -1)
        return getattr(mod, varname)
    else:
        return globals()[varname]
1349666
def _get_var_name(self, register_name, mode):
        
        var_name = {
            "pre": self._translator.get_name_init(register_name),
            "post": self._translator.get_name_curr(register_name),
        }

        return var_name[mode]
499517
static String getGlobalNameOfEsModuleLocalVariable(
      ModuleMetadata moduleMetadata, String variableName) {
    return variableName + "$$" + getGlobalName(moduleMetadata, /* googNamespace= */ null);
  }
213051
def get_var(name, factory=None):
    
    if name not in _VARS and factory is not None:
        _VARS[name] = factory()
    return _VARS.get(name)
236801
def search_stack_for_var(varname, verbose=util_arg.NOT_QUIET):
    
    curr_frame = inspect.currentframe()
    if verbose:
        print(' * Searching parent frames for: ' + six.text_type(varname))
    frame_no = 0
    while curr_frame.f_back is not None:
        if varname in curr_frame.f_locals.keys():
            if verbose:
                print(' * Found local in frame: ' + six.text_type(frame_no))
            return curr_frame.f_locals[varname]
        if varname in curr_frame.f_globals.keys():
            if verbose:
                print(' * Found global in frame: ' + six.text_type(frame_no))
            return curr_frame.f_globals[varname]
        frame_no += 1
        curr_frame = curr_frame.f_back
    if verbose:
        print('... Found nothing in all ' + six.text_type(frame_no) + ' frames.')
    return None
658810
def local_variables(self):
        
        return list(set(self.variables) - set(self.returns) - set(self.parameters))
538761
def get_parent_scope_from_var(name, global_ok=False, skip_frames=0) -> typing.Optional[Scope]:
    

    stack = inspect.stack()
    try:
        for frame_info in stack[skip_frames + 1:]:
            frame = None

            try:
                frame = frame_info.frame

                if name in frame.f_locals or (global_ok and name in frame.f_globals):
                    return Scope(globals_=frame.f_globals, locals_=frame.f_locals)
            finally:
                del frame
    finally:
        del stack

    return None
1256107
def get_stack_var(name, depth=0):
    ''''''

    base_frame = _get_base_frame(depth)
    if not base_frame:
        # Frame not found
        raise RuntimeError("Base frame not found")

    # Lookup up the frame stack starting at the base frame for the fiber state
    level = 0
    frame = base_frame
    while frame:
        locals = frame.f_locals
        value = locals.get(name)
        if value is not None:
            if level > 0:
                # Copy a reference of the fiber state in the base frame
                base_frame.f_locals[name] = value
            return value
        if locals.get(SECTION_BOUNDARY_TAG):
            return None
        frame = frame.f_back
        level += 1
    return None
501470
def get(self, var, default=None):
        
        try:
            return self.__get(var)
        except (KeyError, IndexError):
            return default
872665
def _get_variable_value(defined_variables, name):
    
    def fallback(*args, **kwargs):
        raise AssertionError("Variable {0} is not defined in class {1}".format(
                name, defined_variables.__class__.__name__))
    method = getattr(defined_variables, name, fallback)
    val = method()
    return method.field_type(val)
1084633
def get_field(self, name):
        """"""
        # We only make the wrappers here (lazily) to avoid creating a ton of objects needlessly.
        field = self._wrapped_fields.get(name)
        if field is None:
            is_fake = False
            field = self._get_internal_field_by_name(name)
            if field is None:
                # Might be a "fake" field in JSON
                is_fake = self._is_fake_field(name)
                if not is_fake:
                    raise AttributeError("No such field %s" % name)
            field = self._make_wrapped_field(name, field, is_fake=is_fake)
            self._wrapped_fields[name] = field
        return field
138480
def get_local_variable_from_name(self, variable_name):
        
        return next((v for v in self.variables if v.name == variable_name), None)
1160124
def get_var(self, var, info_cb=DEFAULT_MESSAGE_CALLBACK):
    
    return self._simple_command('getvar', arg=var, info_cb=info_cb)
1207394
def variablename(var):
    
    s=[tpl[0] for tpl in itertools.ifilter(lambda x: var is x[1], globals().items())]
    s=s[0].upper()
    return s
1211702
def local_property():
    
    ls = local()

    def fget(self):
        try:
            return ls.var
        except AttributeError:
            raise RuntimeError("Request context not initialized.")

    def fset(self, value):
        ls.var = value

    def fdel(self):
        del ls.var

    return property(fget, fset, fdel, 'Thread-local property')