human
Complete the below
def download(mw, code):

    ''''Download addon/deck from AnkiWeb. Caller must start & stop progress diag.'
    '''
assistant
#Here is the Python program you requested.
    thread = Downloader(code)
    def onRecv():
        try:
            mw.progress.update(label=('%dKB    downloaded' % (thread.recvTotal / 1024)))
        except NameError:
            pass
    thread.recv.connect(onRecv)
    thread.start()
    while (not thread.isFinished()):
        mw.app.processEvents()
        thread.wait(100)
    if (not thread.error):
        return (thread.data, thread.fname)
    else:
        return ('error', thread.error)