class_docstr: Configurations for Borg.
class_docstr_tok: ["Configurations","for","Borg","."]
code: def __init__(  # pylint: disable=super-init-not-called
      self,
      termination_watcher_fn=None,
      exit_fn=None,
      grace_period=None,
      save_fn=None,
  ):
      self.termination_watcher_fn = termination_watcher_fn
      self.exit_fn = (
          exit_fn or failure_handling_util.default_tpu_exit_fn
      )
      self.grace_period = grace_period or 0
      self.save_fn = save_fn
  
imports: import os
  import signal
  import sys
  import threading
  import time
  from tensorflow.core.distributed_runtime.preemption import gen_check_preemption_op
  from tensorflow.python.checkpoint import checkpoint
  from tensorflow.python.checkpoint import checkpoint_context
  from tensorflow.python.checkpoint import checkpoint_management
  from tensorflow.python.distribute import distribute_lib
  from tensorflow.python.distribute import multi_worker_util
  from tensorflow.python.distribute.failure_handling import failure_handling_util
  from tensorflow.python.eager import context
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.lib.io import file_io
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import gfile
  from tensorflow.python.platform import tf_logging
  from tensorflow.python.util import tf_contextlib
  from tensorflow.python.util.deprecation import deprecated
  from tensorflow.python.util.tf_export import tf_export
  from tensorflow.tools.docs import doc_controls
label_desc: Use image node_id 1 to create a new BorgTPUTerminationConfig object from inherited base classes: TerminationConfig with example: obj = BorgTPUTerminationConfig(termination_watcher_fn, exit_fn, grace_period, save_fn)