code: def decompress_file(archive, dir_):
      """Decompress `archive` into a directory `dir_`
  
      This is an alternative implementation without patool, but directly calling 7z.
  
      Parameters
      ----------
      archive: str
      dir_: str
      """
      apath = Path(archive)
      runner = Runner(cwd=dir_)
      suffixes = _normalize_fname_suffixes(apath.suffixes)
      if len(suffixes) > 1 and suffixes[-2] == ".tar":
          # we have a compressed tar file that needs to be fed through the
          # decompressor first
          cmd = "7z x {} -so | 7z x -si -ttar".format(
              quote_cmdlinearg(archive)
          )
      else:
          # fire and forget
          cmd = ["7z", "x", archive]
      runner.run(cmd, protocol=KillOutput)
  
imports: from datalad.support.external_versions import external_versions
  from datalad.utils import Path, join_cmdline, quote_cmdlinearg
  import logging
  from datalad.cmd import WitlessRunner, KillOutput
label_desc: Use image node_id 2 for calling a global function with example usage: decompress_file(archive, dir_) without return types