Prepare and run a subprocess cmd, returning a CompletedProcess.

def run(cmd):
    """Prepare and run a subprocess cmd, returning a CompletedProcess."""
    print("Preparing the following cmd:")
    cmd = prepare_subprocess_cmd(cmd)
    print("Running the following cmd:")
    print('\n'.join(cmd))
    return subprocess.run(cmd, stdout=sys.stdout, stderr=sys.stderr)