from typing import IO
import requests


def download_file(url: str) -> IO:
    """Download a remote file.

    Parameters
    ----------
    url: string
        Request URL.

    Returns
    -------
    io.BytesIO
    """
    r = requests.get(url, stream=True)
    r.raise_for_status()
    return r.raw