def download_dbox_file(path, outdir, filename):
    """Given a link including dropbox.com,
    initialize a dropbox file download.

    need two arguments:
      * file id from the share link
      * file name (may be different from the original file name)
    """
    import requests
    headers = {'user-agent': 'Wget/1.16 (linux-gnu)'}
    r = requests.get(path, stream=True, headers=headers)
    with open(outdir + filename, 'wb') as f:
        for chunk in r.iter_content(chunk_size=1024):
            if chunk:
                f.write(chunk)
