code: def createTemporaryTar(self, name, csv_data, data_files, tmpdir):
      indexcsvfilename = os.path.join(tmpdir, "index.csv")
  
      self._log("Create index.csv")
      self._progress.init(len(csv_data), "Create index.csv")
      with open(indexcsvfilename, "w", newline="") as f:
          csvwriter = csv.writer(f)
          for row in csv_data:
              csvwriter.writerow(row)
      self._progress.finish()
  
      tarfilename = os.path.join(tmpdir, "{}.tar".format(name))
  
      self._log("Add file to tar archive.")
      self._progress.init(len(data_files), "Create TAR")
      with tarfile.open(tarfilename, "w") as tar:
          tar.add(indexcsvfilename, "index.csv")
          for datafile in sorted(data_files.keys()):
              self._progress(1.0)
              tar.add(data_files[datafile], datafile)
      self._progress.finish()
  
      return tarfilename
  
imports: import boto3
  import csv
  import json
  import os
  import urllib.parse
  import urllib.request
  import shutil
  import tarfile
  import tempfile
  import threading
  import tqdm
label_desc: Use image node_id 2 for calling the Uploader obj's underlying member method code with example usage: obj.createTemporaryTar(name, csv_data, data_files, tmpdir) and returns: tarfilename