class_docstr: Full manager.
  
  Builds app config and compute template and starts/terminated session
  using SDK.
code: def terminate_cluster_ex(self, wait: bool = False):
      if self.cluster_id:
          logger.info(f"Terminating cluster with ID {self.cluster_id}")
          # Just trigger a request. No need to wait until session shutdown.
          result = self.sdk.terminate_cluster(
              cluster_id=self.cluster_id, terminate_cluster_options={}
          )
  
          logger.info(
              f"Terminate request for cluster with ID {self.cluster_id} sent"
          )
  
          if not wait:
              return
  
          # Only do this when waiting
          cop_id = result.result.id
          completed = result.result.completed
          while not completed:
              # Sleep 1 sec before next check.
              time.sleep(1)
  
              cluster_operation_response = (
                  self.sdk.get_cluster_operation(
                      cop_id, _request_timeout=30
                  )
              )
              cluster_operation = cluster_operation_response.result
              completed = cluster_operation.completed
  
          result = self.sdk.get_cluster(self.cluster_id)
          while result.result.state != "Terminated":
              time.sleep(1)
              result = self.sdk.get_cluster(self.cluster_id)
  
file_path: ray/release/ray_release/cluster_manager/full.py
imports: import time
  from ray_release.exception import ClusterCreationError, ClusterStartupError, ClusterStartupTimeout, ClusterStartupFailed
  from ray_release.logger import logger
  from ray_release.cluster_manager.minimal import MinimalClusterManager
  from ray_release.util import format_link, anyscale_cluster_url, exponential_backoff_retry
label_desc: Use image node_id 2 for calling the FullClusterManager obj's underlying member method code with example usage: obj.terminate_cluster_ex(wait) without return types