code: def deploy_job(
      image_uri,
      chief_config,
      worker_count,
      worker_config,
      entry_point_args,
      enable_stream_logs,
      job_labels=None,
      service_account=None,
  ):
      """Deploys job with the given parameters to Google Cloud.
  
      Args:
          image_uri: The Docker image URI.
          chief_config: `MachineConfig` that represents the configuration for
              the chief worker in a distribution cluster.
          worker_count: Integer that represents the number of general workers
              in a distribution cluster. This count does not include the
              chief worker.
          worker_config: `MachineConfig` that represents the configuration for
              the general workers in a distribution cluster.
          entry_point_args: Command line arguments to pass to the
              `entry_point` program.
          enable_stream_logs: Boolean flag which when enabled streams logs
              back from the cloud job.
          job_labels: Dict of str: str. Labels to organize jobs. See
              [resource labels](
              https://cloud.google.com/ai-platform/training/docs/resource-labels)
          service_account: The email address of a user-managed service account
              to be used for training instead of the service account that AI
              Platform Training uses by default. See [custom service account](
              https://cloud.google.com/ai-platform/training/docs/custom-service-account)
      Returns:
          ID of the invoked remote Cloud AI Platform job.
  
      Raises:
          RuntimeError, if there was an error submitting the job.
      """
      job_id = _generate_job_id()
      project_id = gcp.get_project_name()
      ml_apis = discovery.build(
          "ml",
          "v1",
          cache_discovery=False,
          requestBuilder=google_api_client.TFCloudHttpRequest,
      )
  
      request_dict = _create_request_dict(
          job_id,
          gcp.get_region(),
          image_uri,
          chief_config,
          worker_count,
          worker_config,
          entry_point_args,
          job_labels=job_labels or {},
          service_account=service_account,
      )
      try:
          unused_response = (
              ml_apis.projects()
              .jobs()
              .create(
                  parent="projects/{}".format(project_id),
                  body=request_dict,
              )
              .execute()
          )
          _print_logs_info(job_id, project_id)
          if enable_stream_logs:
              _stream_logs(job_id)
      except errors.HttpError as err:
          print("There was an error submitting the job.")
          raise err
      return job_id
  
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 1 for calling a global function with example usage: deploy_job(image_uri, chief_config, worker_count, worker_config, entry_point_args, enable_stream_logs, job_labels, service_account) and returns: job_id