def METHOD_NAME(hub, dest, task_id):
    """Downloads results for the given task"""
    task_info = hub.scan.get_task_info(task_id)
    task_url = hub.client.task_url(task_id)
    # we need result_filename + '.tar.xz'
    tarball = _get_result_filename(task_info['args']) + '.tar.xz'
    # get absolute path
    dest_dir = os.path.abspath(dest if dest is not None else os.curdir)
    local_path = os.path.join(dest_dir, tarball)
    # task_url is url to task with trailing '/'
    url = f"{task_url}log/{tarball}?format=raw"
    print(f"Downloading {tarball}: ", file=sys.stderr, end="")
    try:
        urlretrieve(url, local_path)
    except HTTPError as e:
        print(e, file=sys.stderr)
        return False
    print("OK", file=sys.stderr)
    return True