code: def get_archive_filter_name(filename):
      filters = libarchive.get_archive_filter_names(filename)
      # https://a.yandex-team.ru/arc/trunk/arcadia/contrib/libs/libarchive/libarchive/archive_read.c?rev=5800047#L522
      assert filters[-1] == "none", filters
      if len(filters) == 1:
          return None
      if len(filters) == 2:
          return filters[0]
      raise Exception("Archive has chain of filter: {}".format(filters))
  
imports: import errno
  import logging
  import os
  import random
  import shutil
  import stat
  import string
  import sys
  import six
  import libarchive
  import libarchive._libarchive
  from pathlib2 import PurePath
label_desc: Use image node_id 11 for calling a global function with example usage: get_archive_filter_name(filename) and returns: None, filters