docs: def get_process_output(process, encoding=None):
      """Get the output from the process."""
  
      output = process.communicate()
      returncode = process.returncode
  
      if not encoding:
          try:
              encoding = sys.stdout.encoding
          except Exception:
              encoding = locale.getpreferredencoding()
  
      if returncode != 0:
          raise RuntimeError("Runtime Error: %s" % (output[0].rstrip().decode(encoding, errors='replace')))
  
      return output[0].decode(encoding, errors='replace')