def METHOD_NAME(file_name, content):
    """Utility to encode the given string as a gzipped tar and return the bytes."""
    tar_fileobj = io.BytesIO()
    with tarfile.open(fileobj=tar_fileobj, mode="w|gz") as tar:
        content = content.encode("utf-8")
        tf = tarfile.TarInfo(file_name)
        tf.size = len(content)
        tar.addfile(tf, io.BytesIO(content))
    tar_fileobj.seek(0)
    return tar_fileobj.read()