def METHOD_NAME(args: Namespace, output_file: str = None):
    """Export the logs associated to the cluster."""
    LOGGER.debug("Beginning export of logs for the cluster: %s", args.cluster_name)
    cluster = Cluster(args.cluster_name)
    url = cluster.export_logs(
        bucket=args.bucket,
        bucket_prefix=args.bucket_prefix,
        keep_s3_objects=args.keep_s3_objects,
        start_time=args.start_time,
        end_time=args.end_time,
        filters=args.filters,
        output_file=output_file,
    )
    LOGGER.debug("Cluster's logs exported correctly to %s", url)
    return {"path": output_file} if output_file is not None else {"url": url}