code: def _make_tarball(self, target_name):
      # creating something to tar
      tmpdir = self.mkdtemp()
      self.write_file([tmpdir, "file1"], "xxx")
      self.write_file([tmpdir, "file2"], "xxx")
      os.mkdir(os.path.join(tmpdir, "sub"))
      self.write_file([tmpdir, "sub", "file3"], "xxx")
  
      tmpdir2 = self.mkdtemp()
      unittest.skipUnless(
          splitdrive(tmpdir)[0] == splitdrive(tmpdir2)[0],
          "source and target should be on same drive",
      )
  
      base_name = os.path.join(tmpdir2, target_name)
  
      # working with relative paths to avoid tar warnings
      old_dir = os.getcwd()
      os.chdir(tmpdir)
      try:
          make_tarball(splitdrive(base_name)[1], ".")
      finally:
          os.chdir(old_dir)
  
      # check if the compressed tarball was created
      tarball = base_name + ".tar.gz"
      self.assertTrue(os.path.exists(tarball))
  
      # trying an uncompressed one
      base_name = os.path.join(tmpdir2, target_name)
      old_dir = os.getcwd()
      os.chdir(tmpdir)
      try:
          make_tarball(splitdrive(base_name)[1], ".", compress=None)
      finally:
          os.chdir(old_dir)
      tarball = base_name + ".tar"
      self.assertTrue(os.path.exists(tarball))
  
imports: import unittest
  import os
  import sys
  import tarfile
  from os.path import splitdrive
  import warnings
  from distutils.archive_util import check_archive_formats, make_tarball, make_zipfile, make_archive, ARCHIVE_FORMATS
  from distutils.spawn import find_executable, spawn
  from distutils.tests import support
  from test.test_support import check_warnings, run_unittest
label_desc: Use image node_id 2 for calling the ArchiveUtilTestCase obj's underlying member method code with example usage: obj._make_tarball(target_name) without return types