class_docstr: Hook for Google ML Engine APIs.
  
  All the methods in the hook where project_id is used must be called with
  keyword arguments rather than positional.
class_docstr_tok: ["Hook","for","Google","ML","Engine","APIs",".","All","the","methods","in","the","hook","where","project_id","is","used","must","be","called","with","keyword","arguments","rather","than","positional","."]
docstr: Launches a MLEngine job and wait for it to reach a terminal state.
  
  :param project_id: The Google Cloud project id within which MLEngine
      job will be launched. If set to None or missing, the default project_id from the Google Cloud
      connection is used.
  :param body: MLEngine Job object that should be provided to the MLEngine
      API, such as: ::
  
          {
            'jobId': 'my_job_id',
            'trainingInput': {
              'scaleTier': 'STANDARD_1',
              ...
            }
          }
  :return: The MLEngine job_id of the object if the job successfully reach a
      terminal state (which might be FAILED or CANCELLED state).
docstr_tok: ["Launches","a","MLEngine","job","and","wait","for","it","to","reach","a","terminal","state",".",":","param","project_id",":","The","Google","Cloud","project","id","within","which","MLEngine","job","will","be","launched",".","If","set","to","None","or","missing",",","the","default","project_id","from","the","Google","Cloud","connection","is","used",".",":","param","body",":","MLEngine","Job","object","that","should","be","provided","to","the","MLEngine","API",",","such","as",":",":",":","{","'jobId","'",":","'my_job_id","'",",","'trainingInput","'",":","{","'scaleTier","'",":","'STANDARD_1","'",",","...","}","}",":","return",":","The","MLEngine","job_id","of","the","object","if","the","job","successfully","reach","a","terminal","state","(","which","might","be","FAILED","or","CANCELLED","state",")","."]
code: def create_job_without_waiting_result(
      self,
      body: dict,
      project_id: str,
  ):
      """
      Launches a MLEngine job and wait for it to reach a terminal state.
  
      :param project_id: The Google Cloud project id within which MLEngine
          job will be launched. If set to None or missing, the default project_id from the Google Cloud
          connection is used.
      :param body: MLEngine Job object that should be provided to the MLEngine
          API, such as: ::
  
              {
                'jobId': 'my_job_id',
                'trainingInput': {
                  'scaleTier': 'STANDARD_1',
                  ...
                }
              }
      :return: The MLEngine job_id of the object if the job successfully reach a
          terminal state (which might be FAILED or CANCELLED state).
      """
      hook = self.get_conn()
  
      self._append_label(body)
      request = (
          hook.projects()
          .jobs()
          .create(parent=f"projects/{project_id}", body=body)
      )
      job_id = body["jobId"]
      request.execute(num_retries=self.num_retries)
      return job_id
  
imports: from __future__ import annotations
  import contextlib
  import logging
  import random
  import time
  from typing import TYPE_CHECKING, Callable
  from aiohttp import ClientSession
  from gcloud.aio.auth import AioSession, Token
  from googleapiclient.discovery import Resource, build
  from googleapiclient.errors import HttpError
  from airflow.exceptions import AirflowException
  from airflow.providers.google.common.hooks.base_google import GoogleBaseAsyncHook, GoogleBaseHook
  from airflow.version import version
label_desc: Use image node_id 4 for calling the MLEngineHook obj's underlying member method code with example usage: obj.create_job_without_waiting_result(body, project_id) and returns: job_id