def _run_cmd()

in cli/node_config_fetcher.py [0:0]


  def _run_cmd(self, cmd: str) -> str:
    """Runs a bash command and returns the output."""
    result = subprocess.run(
        cmd,
        shell=True,
        check=True,
        capture_output=True,
        text=True,
    )
    if result.returncode != 0:
      raise subprocess.CalledProcessError(
          result.returncode, cmd, result.stderr, result.stdout
      )
    return result.stdout