code: def _iter_open_tar(tar_obj, extract_dir, progress_filter):
      """Emit member-destination pairs from a tar archive."""
      # don't do any chowning!
      tar_obj.chown = lambda *args: None
  
      with contextlib.closing(tar_obj):
          for member in tar_obj:
              name = member.name
              # don't extract absolute paths or ones with .. in them
              if name.startswith("/") or ".." in name.split("/"):
                  continue
  
              prelim_dst = os.path.join(extract_dir, *name.split("/"))
  
              try:
                  member = _resolve_tar_file_or_dir(tar_obj, member)
              except LookupError:
                  continue
  
              final_dst = progress_filter(name, prelim_dst)
              if not final_dst:
                  continue
  
              if final_dst.endswith(os.sep):
                  final_dst = final_dst[:-1]
  
              yield member, final_dst
  
file_path: catboost/contrib/python/setuptools/py3/setuptools/archive_util.py
imports: import zipfile
  import tarfile
  import os
  import shutil
  import posixpath
  import contextlib
  from distutils.errors import DistutilsError
  from ._path import ensure_directory
label_desc: Use image node_id 7 for calling a global function with example usage: _iter_open_tar(tar_obj, extract_dir, progress_filter) without return types