code: def _sendline(self, line):
          
          self.lines = []
          try:
              self._read()
          except socket.error:
              logging.debug('Nothing cleared')
  
          logger.debug('sending [%s]', line)
          self._write(line + '\r\n')
  
          # wait for write to complete
          time.sleep(0.5)
docs: Send exactly one line to the device
  
          Args:
              line str: data send to device