def close(self):
if self._my_data.closed:<EOL><INDENT>raise IllegalState()<EOL><DEDENT>self._my_data.close()<EOL>
Closes this stream and frees up any allocated resources.

        Methods in this object may not be invoked after this method is
        called.

        raise:  IllegalState - this stream has been closed
        *compliance: mandatory -- This method must be implemented.*