docs: def run_cmd(cmd):
      """
      Runs a command using subprocess, and returns both the stdout and stderr from that command
      If exit code from command is non-zero, raises subproess.CalledProcessError
      :param cmd: command to run as a string, as it would be called on the command line
      :return: out, err: Strings that are the stdout and stderr from the command called.
      """
      p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
      out, err = p.communicate()
      out = out.decode('utf-8')
      err = err.decode('utf-8')
      if p.returncode != 0:
          raise subprocess.CalledProcessError(p.returncode, cmd=cmd)
      return out, err