code: def untar(tar_file, directory):
      """Unpack all tar files into the directory
  
      Parameters
      ----------
      tar_file : str
          The source tar file.
  
      directory : str
          The target directory
      """
      cmd = ["tar"]
      cmd += ["-xf"]
      cmd += [tar_file]
      cmd += ["-C", directory]
      proc = subprocess.Popen(
          cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT
      )
      (out, _) = proc.communicate()
  
      if proc.returncode != 0:
          msg = "Tar error:\n"
          msg += py_str(out)
          raise RuntimeError(msg)
  
file_path: tvm/python/tvm/contrib/tar.py
imports: from __future__ import absolute_import
  import os
  import shutil
  import subprocess
  from .None import utils
  from .._ffi.base import py_str
label_desc: Use image node_id 2 for calling a global function with example usage: untar(tar_file, directory) without return types