code: def extract_tar (archive, compression, cmd, verbosity, interactive, outdir):
      
      try:
          with tarfile.open(archive) as tfile:
              tfile.extractall(path=outdir)
      except Exception as err:
          msg = "error extracting %s: %s" % (archive, err)
          raise util.PatoolError(msg)
      return None
docs: Extract a TAR archive with the tarfile Python module.