<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_xml_document(self, document):
 """Writes a string representation of an ``ElementTree`` object to the output stream. :param document: An ``ElementTree`` object. """

        self._out.write(ET.tostring(document))
        self._out.flush()