<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _send_data(self, data):
 """ Try to send all data in buffer. """

        try:
            self.socket.sendall(data)
            self._reset_errors()
        except:
            self._close()
            self._throttle_error("GraphiteHandler: Socket error, "
                                 "trying reconnect.")
            self._connect()
            try:
                self.socket.sendall(data)
            except:
                return
            self._reset_errors()