code: def is_tpu_present() -> bool:
      """Returns true if TPU devices are present."""
      # Check if TPU is present from initialized context.
      # TPU_SYSTEM is a device that indicates TPUs are present.
      tpu_system_devices = tf_config.list_physical_devices("TPU_SYSTEM")
      return bool(tpu_system_devices)
  
imports: import os
  from typing import List, Optional, Union
  from tensorflow.python.eager import context
  from tensorflow.python.framework import config
  from tensorflow.python.framework import device
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 12 for calling a global function with example usage: is_tpu_present() and returns: bool