code: def test_stable_archive(compression_level, compression_filter):
      archive._make_dirs("stable")
      archive._make_dirs("stable/dir")
      with open("stable/stable.txt", "w") as f:
          f.write("pretty l" + ("o" * 1000) + "ng string")
  
      tar_path = yatest.common.output_path("test_stable.tar")
  
      def tar_and_get_hash(fixed_mtime):
          # change mtime
          os.utime(
              "stable/stable.txt",
              (0, os.stat("stable/stable.txt").st_mtime + 1),
          )
  
          archive.tar(
              "stable",
              tar_path,
              compression_filter=compression_filter,
              compression_level=compression_level,
              fixed_mtime=fixed_mtime,
          )
          with open(tar_path, "rb") as afile:
              return hashlib.md5(afile.read()).digest()
  
      hash1 = tar_and_get_hash(fixed_mtime=None)
  
      extract_tar(tar_path, "out")
      assert list_files("out") == ["stable/stable.txt"]
  
      # mtime changed
      assert hash1 != tar_and_get_hash(fixed_mtime=None)
      assert tar_and_get_hash(fixed_mtime=0) == tar_and_get_hash(
          fixed_mtime=0
      )
  
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 15 for calling a global function with example usage: test_stable_archive(compression_level, compression_filter) and returns: hashlib