def METHOD_NAME(self, byte_range, retry_exceptions):
    # You can occasionally get socket.errors when downloading
    # chunks from Glacier, so each chunk can be retried up
    # to 5 times.
    for _ in range(5):
        try:
            response = self.get_output(byte_range)
            data = response.read()
            expected_tree_hash = response['TreeHash']
            return data, expected_tree_hash
        except retry_exceptions as e:
            continue
    else:
        raise DownloadArchiveError("There was an error downloading"
                                   "byte range %s: %s" % (byte_range,
                                                          e))