def METHOD_NAME(
    resp: Response,
    link: Link,
    progress_bar: str,
) -> Iterable[bytes]:
    total_length = _get_http_response_size(resp)
    if link.netloc == PyPI.file_storage_domain:
        url = link.show_url
    else:
        url = link.url_without_fragment
    logged_url = redact_auth_from_url(url)
    if total_length:
        logged_url = "{} ({})".format(logged_url, format_size(total_length))
    if is_from_cache(resp):
        logger.info("Using cached %s", logged_url)
    else:
        logger.info("Downloading %s", logged_url)
    if logger.getEffectiveLevel() > logging.INFO:
        show_progress = False
    elif is_from_cache(resp):
        show_progress = False
    elif not total_length:
        show_progress = True
    elif total_length > (40 * 1000):
        show_progress = True
    else:
        show_progress = False
    chunks = response_chunks(resp, CONTENT_CHUNK_SIZE)
    if not show_progress:
        return chunks
    renderer = get_download_progress_renderer(bar_type=progress_bar, size=total_length)
    return renderer(chunks)