def _sh_quote_command(cmd): """Convert a command (an argument to subprocess.run()) to a shell command string.""" return ' '.join(_sh_quote(x) for x in cmd)