def get(self, remotepath, localpath, callback=None):
with open(localpath, "<STR_LIT:wb>") as fl:<EOL><INDENT>size = self.getfo(remotepath, fl, callback)<EOL><DEDENT>s = os.stat(localpath)<EOL>if s.st_size != size:<EOL><INDENT>raise IOError(<EOL>"<STR_LIT>".format(s.st_size, size)<EOL>)<EOL><DEDENT>
Copy a remote file (``remotepath``) from the SFTP server to the local
host as ``localpath``.  Any exception raised by operations will be
passed through.  This method is primarily provided as a convenience.

:param str remotepath: the remote file to copy
:param str localpath: the destination path on the local host
:param callable callback:
    optional callback function (form: ``func(int, int)``) that accepts
    the bytes transferred so far and the total bytes to be transferred

.. versionadded:: 1.4
.. versionchanged:: 1.7.4
    Added the ``callback`` param