def send_element(self, element):
with self.lock:<EOL><INDENT>if self._eof or self._socket is None or not self._serializer:<EOL><INDENT>logger.debug("<STR_LIT>".format(<EOL>element_to_unicode(element)))<EOL>return<EOL><DEDENT>data = self._serializer.emit_stanza(element)<EOL>self._write(data.encode("<STR_LIT:utf-8>"))<EOL><DEDENT>
Send an element via the transport.