code: def test_extract_tar():
      out_tar = yatest.common.output_path("out_tar")
      out_tar_gz = yatest.common.output_path("out_tar_gz")
      extract_tar(os.path.join(data_dir, "sample.tar"), out_tar)
      extract_tar(os.path.join(data_dir, "sample.tar.gz"), out_tar_gz)
      for d in [out_tar, out_tar_gz]:
          for f in ["1.txt", "2/2.txt", "executable.sh"]:
              assert os.path.exists(os.path.join(d, f))
          assert os.access(os.path.join(d, "executable.sh"), os.X_OK)
  
imports: import errno
  import hashlib
  import os
  import shutil
  import socket
  import tarfile
  import threading
  import six
  import pytest
  import yatest.common
  import library.python.archive
label_desc: Use image node_id 2 for calling a global function with example usage: test_extract_tar() without return types