code: def check_decompress_file(leading_directories, path=None):
      outdir = op.join(path, "simple-extracted")
  
      with swallow_outputs() as cmo:
          decompress_file(
              op.join(path, fn_archive_obscure_ext),
              outdir,
              leading_directories=leading_directories,
          )
          eq_(cmo.out, "")
          eq_(cmo.err, "")
  
      path_archive_obscure = op.join(outdir, fn_archive_obscure)
      if leading_directories == "strip":
          assert not op.exists(path_archive_obscure)
          testpath = outdir
      elif leading_directories is None:
          assert op.exists(path_archive_obscure)
          testpath = path_archive_obscure
      else:
          raise NotImplementedError(
              "Dunno about this strategy: %s" % leading_directories
          )
  
      assert op.exists(op.join(testpath, "3.txt"))
      assert op.exists(op.join(testpath, fn_in_archive_obscure))
      with open(op.join(testpath, "3.txt")) as f:
          eq_(f.read(), "3 load")
  
imports: import itertools
  import os
  from unittest.mock import patch
  import pytest
  from datalad import cfg
  from datalad.support import path
  from datalad.support.archive_utils_patool import unixify_path
  from datalad.support.archives import ArchivesCache, ExtractedArchive, compress_files, decompress_file
  from datalad.support.exceptions import MissingExternalDependency
  from datalad.support.external_versions import external_versions
  from datalad.tests.utils_pytest import OBSCURE_FILENAME, SkipTest, assert_false, assert_raises, assert_true, eq_, ok_file_has_content, ok_generator, on_nfs, on_travis, on_windows, skip_if, swallow_outputs, with_tempfile, with_tree
  import mimetypes
label_desc: Use image node_id 1 for calling a global function with example usage: check_decompress_file(leading_directories, path) without return types