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