code: def data_received(self, data):
          
          data = data.decode()
          log.debug('received data: %s', data.strip())
          self.buffer += data
          self.handle_lines()
docs: Add incoming data to buffer.