def _lookup_global(self, symbol):
assert symbol.parts<EOL>namespace = self.namespaces<EOL>if len(symbol.parts) == <NUM_LIT:1>:<EOL><INDENT>namespace = self.namespaces[None]<EOL><DEDENT>try:<EOL><INDENT>return self._lookup_namespace(symbol, namespace)<EOL><DEDENT>except Error as orig_exc:<EOL><INDENT>try:<EOL><INDENT>namespace = self.namespaces[None]<EOL>return self._lookup_namespace(symbol, namespace)<EOL><DEDENT>except Error:<EOL><INDENT>raise orig_exc<EOL><DEDENT><DEDENT>
Helper for lookup_symbol that only looks up global variables.

        Args:
          symbol: Symbol