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: Delete a Model. Blocks until finished.
  
  :param model_name: The name of the model.
  :param delete_contents: Whether to force the deletion even if the models is not empty.
      Will delete all version (if any) in the dataset if set to True.
      The default value is False.
  :param project_id: The Google Cloud project name to which MLEngine model belongs. If set to None
      or missing, the default project_id from the Google Cloud connection is used. (templated)
  :raises: googleapiclient.errors.HttpError
docstr_tok: ["Delete","a","Model",".","Blocks","until","finished",".",":","param","model_name",":","The","name","of","the","model",".",":","param","delete_contents",":","Whether","to","force","the","deletion","even","if","the","models","is","not","empty",".","Will","delete","all","version","(","if","any",")","in","the","dataset","if","set","to","True",".","The","default","value","is","False",".",":","param","project_id",":","The","Google","Cloud","project","name","to","which","MLEngine","model","belongs",".","If","set","to","None","or","missing",",","the","default","project_id","from","the","Google","Cloud","connection","is","used",".","(","templated",")",":","raises",":","googleapiclient.errors.HttpError"]
code: def delete_model(
      self,
      model_name: str,
      project_id: str,
      delete_contents: bool = False,
  ) -> None:
      """
      Delete a Model. Blocks until finished.
  
      :param model_name: The name of the model.
      :param delete_contents: Whether to force the deletion even if the models is not empty.
          Will delete all version (if any) in the dataset if set to True.
          The default value is False.
      :param project_id: The Google Cloud project name to which MLEngine model belongs. If set to None
          or missing, the default project_id from the Google Cloud connection is used. (templated)
      :raises: googleapiclient.errors.HttpError
      """
      hook = self.get_conn()
  
      if not model_name:
          raise ValueError(
              "Model name must be provided and it could not be an empty string"
          )
      model_path = f"projects/{project_id}/models/{model_name}"
      if delete_contents:
          self._delete_all_versions(model_name, project_id)
      request = hook.projects().models().delete(name=model_path)
      try:
          request.execute(num_retries=self.num_retries)
      except HttpError as e:
          if e.resp.status == 404:
              self.log.error("Model was not found: %s", e)
              return
          raise
  
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 14 for calling the MLEngineHook obj's underlying member method code with example usage: obj.delete_model(model_name, project_id, delete_contents) without return types