'Check if we are currently one level inside a namespace body.
Returns:
True if top of the stack is a namespace block, False otherwise.'

def InNamespaceBody(self):

    return (self.stack and isinstance(self.stack[(-1)], _NamespaceInfo))
