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: Sets a version to be the default. Blocks until finished.
  
  :param model_name: The name of the Google Cloud ML Engine model that the version belongs to.
      (templated)
  :param version_name: A name to use for the version being operated upon. (templated)
  :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)
  :return: If successful, return an instance of Version.
      Otherwise raises an error.
  :raises: googleapiclient.errors.HttpError
docstr_tok: ["Sets","a","version","to","be","the","default",".","Blocks","until","finished",".",":","param","model_name",":","The","name","of","the","Google","Cloud","ML","Engine","model","that","the","version","belongs","to",".","(","templated",")",":","param","version_name",":","A","name","to","use","for","the","version","being","operated","upon",".","(","templated",")",":","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",")",":","return",":","If","successful",",","return","an","instance","of","Version",".","Otherwise","raises","an","error",".",":","raises",":","googleapiclient.errors.HttpError"]
code: def set_default_version(
      self,
      model_name: str,
      version_name: str,
      project_id: str,
  ) -> dict:
      """
      Sets a version to be the default. Blocks until finished.
  
      :param model_name: The name of the Google Cloud ML Engine model that the version belongs to.
          (templated)
      :param version_name: A name to use for the version being operated upon. (templated)
      :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)
      :return: If successful, return an instance of Version.
          Otherwise raises an error.
      :raises: googleapiclient.errors.HttpError
      """
      hook = self.get_conn()
      full_version_name = f"projects/{project_id}/models/{model_name}/versions/{version_name}"
  
      request = (
          hook.projects()
          .models()
          .versions()
          .setDefault(name=full_version_name, body={})
      )
  
      try:
          response = request.execute(num_retries=self.num_retries)
          self.log.info(
              "Successfully set version: %s to default", response
          )
          return response
      except HttpError as e:
          self.log.error("Something went wrong: %s", e)
          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 9 for calling the MLEngineHook obj's underlying member method code with example usage: obj.set_default_version(model_name, version_name, project_id) and returns: response