def METHOD_NAME(
    s3, bucket, prefix, desired_filename, outdir=None, outpath=None
) -> bool:
    haystack = []
    found_needle = False
    response = s3.list_objects_v2(Bucket=bucket, Prefix=prefix, MaxKeys=100)
    if (not response.get("KeyCount")) or ("Contents" not in response):
        raise Exception("nothing found in s3://{}/{}".format(bucket, prefix))
    for x in response["Contents"]:
        path = x["Key"]
        haystack.append(path)
        _, fname = path.rsplit("/", 1)
        if fname == desired_filename:
            if outpath is None:
                if outdir is None:
                    outdir = "."
                outpath = os.path.join(outdir, desired_filename)
            logger.info("s3://%s/%s -> %s", bucket, x["Key"], outpath)
            s3.download_file(bucket, x["Key"], outpath)
            found_needle = True
            break
    if not found_needle:
        logger.warning(f"file {desired_filename} not found in s3://{bucket}/{prefix}")
    return found_needle