def get_pypi_release_dls(releases):
    """ Count downloads from the `releases` key of pypi info from
        `get_pypi_info`.
        Arguments:
            releases : A dict of release versions and info from
                       get_pypi_info(pkgname)['releases'].
    """
    if not releases:
        return 0
    return sum(
        verinfo.get('downloads', 0)
        for ver in releases
        for verinfo in releases[ver]
    )