def download(self, id, attid): # pylint: disable=invalid-name,redefined-builtin
        """Download a device's attachment.

        :param id: Device ID as an int.
        :param attid: Attachment ID as an int.
        :rtype: tuple `(io.BytesIO, 'filename')`
        """
        resp = self.service.get_id(self._base(id), attid, params={'format': 'download'}, stream=True)
        b = io.BytesIO()
        stream.stream_response_to_file(resp, path=b)
        resp.close()
        b.seek(0)
        return (b, self.service.filename(resp))