code: def _patool_run(cmd, verbosity=0, **kwargs):
      """Decorated runner for patool so it doesn't spit out outputs to stdout"""
      # use our runner
      try:
          # kwargs_ = kwargs[:];         kwargs_['shell'] = True
          # Any debug/progress output could be spit out to stderr so let's
          # "expect" it.
          #
          if isinstance(cmd, (list, tuple)) and kwargs.pop(
              "shell", None
          ):
              # patool (as far as I see it) takes care about quoting args
              cmd = " ".join(cmd)
          out = _runner.run(cmd, protocol=StdOutErrCapture, **kwargs)
          lgr.debug(
              "Finished running for patool. stdout=%s, stderr=%s",
              out["stdout"],
              out["stderr"],
          )
          return 0
      except CommandError as e:
          return e.code
      except Exception as e:
          lgr.error(
              "While invoking runner caught unexpected exception: %s", e
          )
          return 100
  
file_path: datalad/datalad/support/archive_utils_patool.py
imports: import patoolib
  from .external_versions import external_versions
  import os
  from .exceptions import MissingExternalDependency
  from .path import basename, join
  from datalad.utils import ensure_bytes, chpwd
  import logging
  import patoolib.util
  from ..support.exceptions import CommandError
  from ..utils import swallow_outputs
  from datalad.cmd import WitlessRunner, StdOutErrCapture
  from ..utils import ensure_unicode
  from ..utils import on_windows
label_desc: Use image node_id 1 for calling a global function with example usage: _patool_run(cmd, verbosity) and returns: int, e, int