class_docstr: A context where the current model is built in.
  You need to use :func:`TowerContext` to create a :class:`BaseTowerContext`.
class_docstr_tok: ["A","context","where","the","current","model","is","built","in",".","You","need","to","use",":","func",":","`","TowerContext","`","to","create","a",":","class",":","`","BaseTowerContext","`","."]
code: def __exit__(self, exc_type, exc_val, exc_tb):
      global _CurrentTowerContext
      _CurrentTowerContext = None
  
      if not self.has_own_variables:
          diff_trainable_vars = (
              self._collection_guard.get_collection_in_tower(
                  tf.GraphKeys.TRAINABLE_VARIABLES
              )
          )
          assert (
              len(diff_trainable_vars) == 0
          ), "New TRAINABLE_VARIABLES shouldn't be created in {}: ".format(
              self._name
          ) + ", ".join(
              [k.name for k in diff_trainable_vars]
          )
      for c in self._ctxs[::-1]:
          c.__exit__(exc_type, exc_val, exc_tb)
      return False
  
imports: from abc import ABCMeta, abstractmethod, abstractproperty
  import six
  from ..compat import tfv1
  from ..utils import logger
  from ..utils.argtools import call_only_once
  from ..utils.develop import HIDE_DOC
  from ..utils.naming import MOVING_SUMMARY_OPS_KEY
  from .collection import CollectionGuard
  from .common import get_op_or_tensor_by_name, get_op_tensor_name
label_desc: Use image node_id 11 for calling the BaseTowerContext obj's underlying member method code with example usage: obj.__exit__(exc_type, exc_val, exc_tb) and returns: False