code: def compress_files(files, archive, path=None, overwrite=True):
      """Compress `files` into an `archive` file
  
      Parameters
      ----------
      files : list of str
      archive : str
      path : str
        Alternative directory under which compressor will be invoked, to e.g.
        take into account relative paths of files and/or archive
      overwrite : bool
        Whether to allow overwriting the target archive file if one already exists
      """
      runner = Runner(cwd=path)
      apath = Path(archive)
      if apath.exists():
          if overwrite:
              apath.unlink()
          else:
              raise ValueError(
                  "Target archive {} already exists and overwrite is forbidden".format(
                      apath
                  )
              )
      suffixes = _normalize_fname_suffixes(apath.suffixes)
      if len(suffixes) > 1 and suffixes[-2] == ".tar":
          cmd = "7z u .tar -so -- {} | 7z u -si -- {}".format(
              join_cmdline(files),
              quote_cmdlinearg(str(apath)),
          )
      else:
          cmd = ["7z", "u", str(apath), "--"] + files
      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 3 for calling a global function with example usage: compress_files(files, archive, path, overwrite) without return types