'Transfers the remote file to a local location.
If local_full_path_or_buffer is a string path, the file will be put
at that location; if it is a file-like buffer, the file will
be written to the buffer but not closed.
:param remote_full_path: full path to the remote file
:type remote_full_path: str
:param local_full_path_or_buffer: full path to the local file or a
file-like buffer
:type local_full_path: str or file-like buffer'

def retrieve_file(self, remote_full_path, local_full_path_or_buffer):

    conn = self.get_conn()
    is_path = isinstance(local_full_path_or_buffer, basestring)
    if is_path:
        output_handle = open(local_full_path_or_buffer, 'wb')
    else:
        output_handle = local_full_path_or_buffer
    (remote_path, remote_file_name) = os.path.split(remote_full_path)
    conn.cwd(remote_path)
    logging.info('Retrieving    file    from    FTP:    {}'.format(remote_full_path))
    conn.retrbinary(('RETR    %s' % remote_file_name), output_handle.write)
    logging.info('Finished    retrieving    file    from    FTP:    {}'.format(remote_full_path))
    if is_path:
        output_handle.close()
