code: def test_archive_to_file_descriptor(comp_filter, comp_level):
      archive._make_dirs("to_file_descriptor")
  
      with open("to_file_descriptor/one.txt", "w") as f:
          f.write("one")
  
      tar_path = yatest.common.output_path("to_file_descriptor.tar")
      rfd, wfd = os.pipe()
  
      def write_tar():
          archive.tar(
              "to_file_descriptor", wfd, comp_filter, comp_level
          )
          os.close(wfd)
  
      th = threading.Thread(target=write_tar)
      th.daemon = True
      th.start()
  
      with open(tar_path, "wb") as afile:
          data = 1
          while data:
              data = os.read(rfd, 64 * 1024)
              afile.write(data)
  
      th.join()
  
      extract_tar(tar_path, "out")
      assert list_files("out") == ["to_file_descriptor/one.txt"]
      with open("out/to_file_descriptor/one.txt") as afile:
          assert afile.read() == "one"
  
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 16 for calling a global function with example usage: test_archive_to_file_descriptor(comp_filter, comp_level) without return types