code: def _retrieve_binary(self, file_name):
          
          with open(file_name, 'wb') as f:
              return self.session.retrbinary('RETR ' + file_name, f.write)
docs: Retrieve a file in binary transfer mode.