<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def write(self, data):
 """ write single molecule or reaction into file """

        self._file.write('<cml>')
        self.__write(data)
        self.write = self.__write