code: def _is_head_node_a_tpu(config: dict) -> bool:
      """Check if the head node is a TPU."""
      node_configs = {
          node_id: node_type["node_config"]
          for node_id, node_type in config[
              "available_node_types"
          ].items()
      }
      return (
          get_node_type(node_configs[config["head_node_type"]])
          == GCPNodeType.TPU
      )
  
imports: import copy
  import json
  import logging
  import os
  import re
  import time
  from functools import partial, reduce
  from cryptography.hazmat.backends import default_backend
  from cryptography.hazmat.primitives import serialization
  from cryptography.hazmat.primitives.asymmetric import rsa
  from google.oauth2 import service_account
  from google.oauth2.credentials import Credentials
  from googleapiclient import discovery, errors
  from ray._private.accelerators import TPUAcceleratorManager, tpu
  from ray.autoscaler._private.gcp.node import MAX_POLLS, POLL_INTERVAL, GCPNodeType
  from ray.autoscaler._private.util import check_legacy_fields
label_desc: Use image node_id 12 for calling a global function with example usage: _is_head_node_a_tpu(config) and returns: unknown