docs: def read(self, numberOfBytes):
          """Read from a port on dummy_serial.
  
          The response is dependent on what was written last to the port on dummy_serial,
          and what is defined in the :data:`RESPONSES` dictionary.
  
          Args:
              numberOfBytes (int): For compability with the real function. 
  
          Returns a **string** for Python2 and **bytes** for Python3.
  
          If the response is shorter than numberOfBytes, it will sleep for timeout.
          If the response is longer than numberOfBytes, it will return only numberOfBytes bytes.
  
          """
          if VERBOSE:
              _print_out('\nDummy_serial: Reading from port (max length {!r} bytes)'.format(numberOfBytes))
          
          if numberOfBytes < 0:
              raise IOError('Dummy_serial: The numberOfBytes to read must not be negative. Given: {!r}'.format(numberOfBytes))
          
          if not self._isOpen:
              raise IOError('Dummy_serial: Trying to read, but the port is not open.')
  
          # Do the actual reading from the waiting data, and simulate the influence of numberOfBytes
  
          if self._waiting_data == DEFAULT_RESPONSE:
              returnstring = self._waiting_data 
          elif numberOfBytes == len(self._waiting_data):
              returnstring = self._waiting_data 
              self._waiting_data = NO_DATA_PRESENT
          elif numberOfBytes < len(self._waiting_data):
              if VERBOSE:
                  _print_out('Dummy_serial: The numberOfBytes to read is smaller than the available data. ' + \
                      'Some bytes will be kept for later. Available data: {!r} (length = {}), numberOfBytes: {}'.format( \
                      self._waiting_data, len(self._waiting_data), numberOfBytes))
              returnstring = self._waiting_data[:numberOfBytes]
              self._waiting_data = self._waiting_data[numberOfBytes:]
          else: # Wait for timeout, as we have asked for more data than available
              if VERBOSE:
                  _print_out('Dummy_serial: The numberOfBytes to read is larger than the available data. ' + \
                      'Will sleep until timeout. Available  data: {!r} (length = {}), numberOfBytes: {}'.format( \
                      self._waiting_data, len(self._waiting_data), numberOfBytes))
              time.sleep(self.timeout)
              returnstring = self._waiting_data 
              self._waiting_data = NO_DATA_PRESENT
          
          # TODO Adapt the behavior to better mimic the Windows behavior
          
          if VERBOSE:
              _print_out('Dummy_serial read return data: {!r} (has length {})\n'.format(returnstring, len(returnstring)))
  
          if sys.version_info[0] > 2: # Convert types to make it python3 compatible
              return bytes(returnstring, encoding='latin1')
          else:
              return returnstring