code: def _stream_logs(job_id):
      """Streams job logs to stdout.
  
      Args:
          job_id: The job id to stream logs from.
  
      Raises:
          RuntimeError: if there are any errors from the streaming subprocess.
      """
      try:
          print("Streaming job logs: ")
          process = subprocess.Popen(
              ["gcloud", "ai-platform", "jobs", "stream-logs", job_id],
              stdout=subprocess.PIPE,
          )
          while True:
              output = process.stdout.readline()
              # Break out of the loop when poll returns an exit code.
              if process.poll() is not None:
                  break
              if output:
                  print(output.decode().replace("\x08", ""))
      except (ValueError, OSError) as err:
          print("There was an error streaming the job logs.")
          raise err
  
file_path: cloud/src/python/tensorflow_cloud/core/deploy.py
imports: import subprocess
  import uuid
  from .None import gcp
  from .None import machine_config
  from googleapiclient import discovery
  from googleapiclient import errors
  from ..utils import google_api_client
label_desc: Use image node_id 4 for calling a global function with example usage: _stream_logs(job_id) without return types