def run(self) -> List[Node]:
    stack = self.env.temp_data.get('cpp:namespace_stack', None)
    if ((not stack) or (len(stack) == 0)):
        logger.warning('C++ namespace pop on empty stack. Defaulting to gobal scope.', location=self.get_source_info())
        stack = []
    else:
        stack.pop()
    if (len(stack) > 0):
        symbol = stack[(- 1)]
    else:
        symbol = self.env.domaindata['cpp']['root_symbol']
    self.env.temp_data['cpp:parent_symbol'] = symbol
    self.env.temp_data['cpp:namespace_stack'] = stack
    self.env.ref_context['cpp:parent_key'] = symbol.get_lookup_key()
    return []
def run(self) -> List[Node]:
    stack = self.env.temp_data.get('cpp:namespace_stack', None)
    if ((not stack) or (len(stack) == 0)):
        logger.warning('C++ namespace pop on empty stack. Defaulting to gobal scope.', location=self.get_source_info())
        stack = []
    else:
        stack.pop()
    if (len(stack) > 0):
        symbol = stack[(- 1)]
    else:
        symbol = self.env.domaindata['cpp']['root_symbol']
    self.env.temp_data['cpp:parent_symbol'] = symbol
    self.env.temp_data['cpp:namespace_stack'] = stack
    self.env.ref_context['cpp:parent_key'] = symbol.get_lookup_key()
    return []