class_docstr: Holds context information during a forward pass through a model. This class should be used via the
  ``ForwardContext.wrap()`` method.
  
  Note that the context is thread-local.
class_docstr_tok: ["Holds","context","information","during","a","forward","pass","through","a","model",".","This","class","should","be","used","via","the","``","ForwardContext.wrap","(",")","``","method",".","Note","that","the","context","is","thread-local","."]
code: def __exit__(self, type, value, traceback):
      ForwardContext.get_contexts().pop()
  
file_path: adapters/src/adapters/context.py
imports: import functools
  import threading
  from .composition import parse_composition, parse_heads_from_composition
label_desc: Use image node_id 3 for calling the ForwardContext obj's underlying member method code with example usage: obj.__exit__(type, value, traceback) without return types