def flush(self):
<EOL>while len(self._batches) > <NUM_LIT:0>:<EOL><INDENT>self._socket.sendall(self._batches[<NUM_LIT:0>])<EOL>self._batches.popleft()<EOL><DEDENT>return self<EOL>
Send buffered metrics in batch requests over TCP