def tar_task_definition(self, name: str, contents: str) -> bytes:
tarstream = BytesIO()<EOL>tar = tarfile.TarFile(fileobj=tarstream, mode='<STR_LIT:w>')<EOL>tarinfo = tarfile.TarInfo(name=name)<EOL>script_bytes = contents.encode("<STR_LIT:utf-8>")<EOL>tarinfo.size = len(script_bytes)<EOL>tarinfo.mtime = int(time.time())<EOL>tar.addfile(tarinfo, BytesIO(script_bytes))<EOL>tar.close()<EOL>return tarstream.getvalue()<EOL>
Returns a tar with the task definition.

        :param name: Name of the file
        :param contents: Contens of the definition, utf-8