class_docstr: Templated context manager.
  
  This class provides syntactic sugar for a stack of objects of known
  type. It allows accessing attributes of the object at the top of the stack
  directly against this object, which allows for very terse syntax.
  
  For example, this code:
  
    stack = _StateStack(Foo)
    stack.enter()
    stack.bar
  
  Is equivalent to:
  
    stack = []
    stack.append(Foo())
    foo = stack[-1]
    foo.bar
  
  See _State for more on how this is used.
  
  Attributes:
    type: Any, the type of objects that this stack holds
    level: int, the current stack depth
    stack: List[Any], the actual stack
    value: Any, the instance of the object at the top of the stack
class_docstr_tok: ["Templated","context","manager",".","This","class","provides","syntactic","sugar","for","a","stack","of","objects","of","known","type",".","It","allows","accessing","attributes","of","the","object","at","the","top","of","the","stack","directly","against","this","object",",","which","allows","for","very","terse","syntax",".","For","example",",","this","code",":","stack","=","_StateStack","(","Foo",")","stack.enter","(",")","stack.bar","Is","equivalent","to",":","stack","=","[","]","stack.append","(","Foo","(",")",")","foo","=","stack","[","-1","]","foo.bar","See","_State","for","more","on","how","this","is","used",".","Attributes",":","type",":","Any",",","the","type","of","objects","that","this","stack","holds","level",":","int",",","the","current","stack","depth","stack",":","List","[","Any","]",",","the","actual","stack","value",":","Any",",","the","instance","of","the","object","at","the","top","of","the","stack"]
code: def enter(self):
      self._stack.append(self.type())
  
imports: import collections
  import enum
  import gast
  from tensorflow.python.autograph.pyct import anno
  from tensorflow.python.autograph.pyct import parser
  from tensorflow.python.autograph.pyct import pretty_printer
  from tensorflow.python.autograph.pyct import templates
label_desc: Use image node_id 4 for calling the _StateStack obj's underlying member method code with example usage: obj.enter() without return types