code: def test_archive_to_file_handle(comp_filter, comp_level):
      archive._make_dirs("to_file_handle")
  
      with open("to_file_handle/one.txt", "w") as f:
          f.write("one")
  
      tar_path = yatest.common.output_path("to_file_handle.tar")
  
      with open(tar_path, "w") as afile:
          archive.tar("to_file_handle", afile, comp_filter, comp_level)
  
      extract_tar(tar_path, "out")
      assert list_files("out") == ["to_file_handle/one.txt"]
      with open("out/to_file_handle/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 17 for calling a global function with example usage: test_archive_to_file_handle(comp_filter, comp_level) without return types