def lookup_symbol(self, name, namespace_stack):
<EOL>symbol = Symbol(name, name.split('<STR_LIT>'), namespace_stack)<EOL>assert symbol.parts<EOL>if symbol.parts[<NUM_LIT:0>] == '<STR_LIT>':<EOL><INDENT>symbol.parts = symbol.parts[<NUM_LIT:1>:]<EOL><DEDENT>elif namespace_stack is not None:<EOL><INDENT>result = self._lookup_in_all_namespaces(symbol)<EOL>if result:<EOL><INDENT>return result<EOL><DEDENT><DEDENT>return self._lookup_global(symbol)<EOL>
Returns AST node and module for symbol if found.

        Args:
          name: 'name of the symbol to lookup'
          namespace_stack: None or ['namespaces', 'in', 'current', 'scope']

        Returns:
          (ast.Node, module (ie, any object stored with symbol)) if found

        Raises:
          Error if the symbol cannot be found.