code: def test_extract_tar_no_slash_dir():
      # this tarball has entry `package` that is a directory
      # but its name does not have trailing slash
      out_color = yatest.common.output_path("out_color")
      extract_tar(os.path.join(data_dir, "color-0.1.2.tgz"), out_color)
      files = [
          "package",
          "package/LICENSE",
          "package/README.md",
          "package/lib",
          "package/package.json",
          "package/lib/index.d.ts",
          "package/lib/index.js",
      ]
      for f in files:
          assert os.path.exists(os.path.join(out_color, f))
  
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 3 for calling a global function with example usage: test_extract_tar_no_slash_dir() without return types