code: def shutdown_accelerator_system() -> None:
      """Shuts down the accelerator system."""
      global _INITIALIZED_ACCELERATOR_SYSTEM_TYPE
      try:
          context.async_wait()
      finally:
          if not is_initialized():
              raise ValueError(
                  "Accelerator system is not initialized. Call "
                  "tf.experimental.dtensor.initialize_accelerator_system first."
              )
  
          device_type = _INITIALIZED_ACCELERATOR_SYSTEM_TYPE
  
          if not config.is_local_mode():
              raise ValueError(
                  "Shutting down accelerator system under multi-client mode is "
                  "not supported."
              )
  
          if device_type == "TPU" and not config.backend_is_pw():
              tpu_util.shutdown_tpu_system()
  
          # reset TF context to stop gRPC servers.
          context._reset_context()  # pylint: disable=protected-access
          context.context()._clear_caches()  # pylint: disable=protected-access
          _INITIALIZED_ACCELERATOR_SYSTEM_TYPE = None
  
file_path: tensorflow-upstream/tensorflow/dtensor/python/accelerator_util.py
imports: from typing import List, Optional
  from absl import logging
  from tensorflow.core.protobuf import cluster_pb2
  from tensorflow.core.protobuf import tensorflow_server_pb2
  from tensorflow.dtensor.python import config
  from tensorflow.dtensor.python import tpu_util
  from tensorflow.python.eager import context
  from tensorflow.python.framework import config
  from tensorflow.python.platform import remote_utils
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 5 for calling a global function with example usage: shutdown_accelerator_system() without return types