<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):
 """Sends some data to the client."""

        # I don't want to add a separate 'Client disconnected' logic for sending.
        # Therefore I just ignore any writes after the first error - the server
        # won't send that much data anyway. Afterwards the read will detect the
        # broken connection and we quit.
        if self._ignore_write_operations:
            return
        assert self.is_connected()
        try:
            self._connection.send(data.encode('ascii'))
        except socket.error:
            self.close()
            self._ignore_write_operations = True