docs: def read(device):
          """
          Reads data from the specified device.
  
          :param device: the AlarmDecoder device
          :type device: :py:class:`~alarmdecoder.devices.Device`
  
          :returns: string
          """
          response = None
          bytes_avail = bytes_available(device)
  
          if isinstance(device, alarmdecoder.devices.SerialDevice):
              response = device._device.read(bytes_avail)
          elif isinstance(device, alarmdecoder.devices.SocketDevice):
              response = device._device.recv(bytes_avail)
  
          return response