def METHOD_NAME(self, pyfile):
    torrent_id = False
    try:
        torrent_id = self.send_request_to_server()
        torrent_url = self.wait_for_server_dl(torrent_id)
        self.pyfile.name = os.path.basename(torrent_url)
        self.download(torrent_url)
    finally:
        if torrent_id is not False and self.config.get("del_finished"):
            self.delete_torrent_from_server(torrent_id)