def close(self):
if self._closed:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>if self.parent:<EOL><INDENT>for symbol, c in self.leaked_referenced_symbols.items():<EOL><INDENT>self.parent.reference(symbol, c)<EOL><DEDENT><DEDENT>self._closed = True<EOL>
Mark the scope as closed, i.e. all symbols have been declared,
and no further declarations should be done.