class_docstr: Hook for Google Compute Engine APIs.
  
  All the methods in the hook where project_id is used must be called with
  keyword arguments rather than positional.
docstr: Retrieves Instance Template by project_id and resource_id.
  
  Must be called with keyword arguments rather than positional.
  
  :param resource_id: Name of the Instance Template.
  :param project_id: Google Cloud project ID where the Compute Engine Instance Template exists.
      If set to None or missing, the default project_id from the Google Cloud connection is used.
  :param retry: A retry object used to retry requests. If `None` is specified, requests
      will not be retried.
  :param timeout: The amount of time, in seconds, to wait for the request to complete.
      Note that if `retry` is specified, the timeout applies to each individual attempt.
  :param metadata: Additional metadata that is provided to the method.
  :return: Instance Template representation as object according to
      https://cloud.google.com/compute/docs/reference/rest/v1/instanceTemplates
  :rtype: object
docstr_tok: ["Retrieves","Instance","Template","by","project_id","and","resource_id",".","Must","be","called","with","keyword","arguments","rather","than","positional",".",":","param","resource_id",":","Name","of","the","Instance","Template",".",":","param","project_id",":","Google","Cloud","project","ID","where","the","Compute","Engine","Instance","Template","exists",".","If","set","to","None","or","missing",",","the","default","project_id","from","the","Google","Cloud","connection","is","used",".",":","param","retry",":","A","retry","object","used","to","retry","requests",".","If","`","None","`","is","specified",",","requests","will","not","be","retried",".",":","param","timeout",":","The","amount","of","time",",","in","seconds",",","to","wait","for","the","request","to","complete",".","Note","that","if","`","retry","`","is","specified",",","the","timeout","applies","to","each","individual","attempt",".",":","param","metadata",":","Additional","metadata","that","is","provided","to","the","method",".",":","return",":","Instance","Template","representation","as","object","according","to","https",":","\/\/cloud.google.com\/compute\/docs\/reference\/rest\/v1\/instanceTemplates",":","rtype",":","object"]
code: def get_instance_template(
      self,
      resource_id: str,
      project_id: str = PROVIDE_PROJECT_ID,
      retry: Retry | None = None,
      timeout: float | None = None,
      metadata: Sequence[tuple[str, str]] = (),
  ) -> InstanceTemplate:
      """
      Retrieves Instance Template by project_id and resource_id.
  
      Must be called with keyword arguments rather than positional.
  
      :param resource_id: Name of the Instance Template.
      :param project_id: Google Cloud project ID where the Compute Engine Instance Template exists.
          If set to None or missing, the default project_id from the Google Cloud connection is used.
      :param retry: A retry object used to retry requests. If `None` is specified, requests
          will not be retried.
      :param timeout: The amount of time, in seconds, to wait for the request to complete.
          Note that if `retry` is specified, the timeout applies to each individual attempt.
      :param metadata: Additional metadata that is provided to the method.
      :return: Instance Template representation as object according to
          https://cloud.google.com/compute/docs/reference/rest/v1/instanceTemplates
      :rtype: object
      """
      client = self.get_compute_instance_template_client()
      instance_template = client.get(
          # Calling method get() on client to get the specified Instance Template.
          # This method accepts request object as an argument and should be of type
          # Union[google.cloud.compute_v1.types.GetInstanceTemplateRequest, dict] to construct a request
          # message.
          # The request object should be represented using arguments:
          #   instance_template (str):
          #       The name of the Instance Template.
          #   project (str):
          #       Project ID for this request.
          request={
              "instance_template": resource_id,
              "project": project_id,
          },
          retry=retry,
          timeout=timeout,
          metadata=metadata,
      )
      return instance_template
  
imports: from __future__ import annotations
  import time
  from typing import TYPE_CHECKING, Any, Sequence
  from google.cloud.compute_v1.services.instance_group_managers import InstanceGroupManagersClient
  from google.cloud.compute_v1.services.instance_templates import InstanceTemplatesClient
  from google.cloud.compute_v1.services.instances import InstancesClient
  from googleapiclient.discovery import build
  from airflow.exceptions import AirflowException
  from airflow.providers.google.common.hooks.base_google import PROVIDE_PROJECT_ID, GoogleBaseHook
label_desc: Use image node_id 8 for calling the ComputeEngineHook obj's underlying member method code with example usage: obj.get_instance_template(resource_id, project_id, retry, timeout, metadata) and returns: instance_template