code: def getNextContextStack(self, contextStack, data=None):
          
          if self._popsCount:
              contextStack = contextStack.pop(self._popsCount)
  
          if self._contextToSwitch is not None:
              if not self._contextToSwitch.dynamic:
                  data = None
              contextStack = contextStack.append(self._contextToSwitch, data)
  
          return contextStack
docs: Apply modification to the contextStack.
          This method never modifies input parameter list