def readv(self, chunks):
self.sftp._log(<EOL>DEBUG, "<STR_LIT>".format(hexlify(self.handle), chunks)<EOL>)<EOL>read_chunks = []<EOL>for offset, size in chunks:<EOL><INDENT>if self._data_in_prefetch_buffers(<EOL>offset<EOL>) or self._data_in_prefetch_requests(offset, size):<EOL><INDENT>continue<EOL><DEDENT>while size > <NUM_LIT:0>:<EOL><INDENT>chunk_size = min(size, self.MAX_REQUEST_SIZE)<EOL>read_chunks.append((offset, chunk_size))<EOL>offset += chunk_size<EOL>size -= chunk_size<EOL><DEDENT><DEDENT>self._start_prefetch(read_chunks)<EOL>for x in chunks:<EOL><INDENT>self.seek(x[<NUM_LIT:0>])<EOL>yield self.read(x[<NUM_LIT:1>])<EOL><DEDENT>
Read a set of blocks from the file by (offset, length).  This is more
efficient than doing a series of `.seek` and `.read` calls, since the
prefetch machinery is used to retrieve all the requested blocks at
once.

:param chunks:
    a list of ``(offset, length)`` tuples indicating which sections of
    the file to read
:return: a list of blocks read, in the same order as in ``chunks``

.. versionadded:: 1.5.4