code: def _check_job_succeeded(
      client: JobSubmissionClient, job_id: str
  ) -> bool:
      status = client.get_job_status(job_id)
      if status == JobStatus.FAILED:
          logs = client.get_job_logs(job_id)
          raise RuntimeError(f"Job failed\nlogs:\n{logs}")
      return status == JobStatus.SUCCEEDED
  
file_path: ray/cpp/test_submit_cpp_job.py
imports: import os
  import shutil
  import sys
  import tempfile
  import pytest
  from ray._private.test_utils import format_web_url, wait_for_condition, wait_until_server_available
  from ray.job_submission import JobStatus, JobSubmissionClient
  from ray.tests.conftest import _ray_start
label_desc: Use image node_id 3 for calling a global function with example usage: _check_job_succeeded(client, job_id) and returns: unknown