code: def write(self, data):
          
          logger.debug('Writing into device input buffer: %r' % data)
          if not isinstance(data, bytes):
              raise TypeError('data must be an instance of bytes')
  
          if len(data) != 1:
              msg = 'data must have a length of 1, not %d'
              raise ValueError(msg % len(data))
  
          self._input_buffer.extend(data)
  
          l = len(self._query_eom)
          if not self._input_buffer.endswith(self._query_eom):
              return
  
          try:
              message = bytes(self._input_buffer[:-l])
              queries = (message.split(self.delimiter) if self.delimiter
                         else [message])
              for query in queries:
                  response = self._match(query)
                  eom = self._response_eom
  
                  if response is None:
                      response = self.error_response('command_error')
  
                  if response is not NoResponse:
                      self._output_buffer.extend(response)
                      self._output_buffer.extend(eom)
  
          finally:
              self._input_buffer = bytearray()
docs: Write data into the device input buffer.
  
          :param data: single element byte
          :type data: bytes