def add_symbol(self, symbol_name, namespace_stack, node, module):
<EOL>if namespace_stack:<EOL><INDENT>last_namespace = self.namespaces<EOL>for namespace in namespace_stack:<EOL><INDENT>last_namespace = last_namespace.setdefault(namespace, {})<EOL><DEDENT><DEDENT>else:<EOL><INDENT>last_namespace = self.namespaces[None]<EOL><DEDENT>return self._add(symbol_name, last_namespace, node, module)<EOL>
Adds symbol_name defined in namespace_stack to the symbol table.

        Args:
          symbol_name: 'name of the symbol to lookup'
          namespace_stack: None or ['namespaces', 'symbol', 'defined', 'in']
          node: ast.Node that defines this symbol
          module: module (any object) this symbol is defined in

        Returns:
          bool(if symbol was *not* already present)