import requests
import shutil


def download_file(url):
    """
    Download file at given URL.
    
    - url: url of file to be downloaded
    - return: downloaded file name
    """
    filename = url.split('/')[-1]
    r = requests.get(url, stream=True)
    with open(filename, 'wb') as f:
        shutil.copyfileobj(r.raw, f)
    return filename