class_docstr: Handler for the Vertex Google AI cloud API
docstr: Logs in to Vertex and deploy a pre-trained model to an endpoint.
  
  If the endpoint already exists for the model, we do nothing.
  
  If the endpoint does not exist, we create it and deploy the model to it.
  The runtime for this is long, it took 15 minutes for a small model.
docstr_tok: ["Logs","in","to","Vertex","and","deploy","a","pre-trained","model","to","an","endpoint",".","If","the","endpoint","already","exists","for","the","model",",","we","do","nothing",".","If","the","endpoint","does","not","exist",",","we","create","it","and","deploy","the","model","to","it",".","The","runtime","for","this","is","long",",","it","took","15","minutes","for","a","small","model","."]
code: def create(self, target, args=None, **kwargs):
      """Logs in to Vertex and deploy a pre-trained model to an endpoint.
  
      If the endpoint already exists for the model, we do nothing.
  
      If the endpoint does not exist, we create it and deploy the model to it.
      The runtime for this is long, it took 15 minutes for a small model.
      """
      assert (
          "using" in args
      ), "Must provide USING arguments for this handler"
      args = args["using"]
  
      model_name = args.pop("model_name")
      custom_model = args.pop("custom_model", False)
  
      service_account_info = self.engine_storage.json_get(
          "service_account"
      )
  
      # get vertex args from handler then update args from model
      vertex_args = self.engine_storage.json_get("args")
      vertex_args.update(args)
  
      vertex = VertexClient(service_account_info, vertex_args)
  
      model = vertex.get_model_by_display_name(model_name)
      if not model:
          raise Exception(f"Vertex model {model_name} not found")
      endpoint_name = model_name + "_endpoint"
      if vertex.get_endpoint_by_display_name(endpoint_name):
          logger.info(
              f"Endpoint {endpoint_name} already exists, skipping deployment"
          )
      else:
          logger.info(f"Starting deployment at {endpoint_name}")
          endpoint = vertex.deploy_model(model)
          endpoint.display_name = endpoint_name
          endpoint.update()
          logger.info(f"Endpoint {endpoint_name} deployed")
  
      predict_args = {}
      predict_args["target"] = target
      predict_args["endpoint_name"] = endpoint_name
      predict_args["custom_model"] = custom_model
      self.model_storage.json_set("predict_args", predict_args)
      self.model_storage.json_set("vertex_args", vertex_args)
  
file_path: mindsdb/mindsdb/integrations/handlers/vertex_handler/vertex_handler.py
imports: import pandas
  import json
  from mindsdb.integrations.libs.base import BaseMLEngine
  from mindsdb.integrations.handlers.vertex_handler.vertex_client import VertexClient
  from mindsdb.utilities import log
label_desc: Use image node_id 1 for calling the VertexHandler obj's underlying member method code with example usage: obj.create(target, args) without return types