def METHOD_NAME(*cmd, capture=False, check=True, env=None, timeout=None):
    """Print and run a command, optionally capturing the output."""
    cmd = [str(p) for p in cmd]
    print(' '.join(cmd))
    return subprocess.METHOD_NAME(cmd,
                          capture_output=capture,
                          check=check,
                          env=env,
                          text=True,
                          timeout=timeout)