def _LookUpStack(self, name):
    i = len(self.stack) - 1
    while 1:
      frame = self.stack[i]
      if name == '@index':
        if frame.index != -1:  # -1 is undefined
          return frame.index  # @index is 1-based
      else:
        context = frame.context
        if hasattr(context, 'get'):  # Can't look up names in a list or atom
          try:
            return context[name]
          except KeyError:
            pass

      i -= 1  # Next frame
      if i <= -1:  # Couldn't find it anywhere
        return self._Undefined(name)
Handle all requests except the connect request.
dataset/ETHPy150Open cloudbuilders/radioedit/jsontemplate.py/_ScopedContext._LookUpStack--crossover with--dataset/ETHPy150Open owtf/owtf/framework/http/proxy/proxy.py/ProxyHandler.get