class_docstr: A thread-local stack of objects for providing implicit defaults.
class_docstr_tok: ["A","thread-local","stack","of","objects","for","providing","implicit","defaults","."]
code: def __init__(self):
      super().__init__()
      self._enforce_nesting = True
      self.stack: list[T] = []
  
file_path: tensorflow-upstream/tensorflow/python/framework/stack.py
imports: from collections.abc import Iterator
  import threading
  from typing import Generic, Optional, TypeVar
  from tensorflow.python.util import tf_contextlib
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 1 to create a new DefaultStack object from inherited base classes: threading, Generic with example: obj = DefaultStack()