class_docstr: Markov dependency declaration.
  
  This is a statistical equivalent of a memory management arena.
  
  :param int history: The number of previous contexts visible from the
      current context. Defaults to 1. If zero, this is similar to
      :class:`pyro.plate`.
  :param bool keep: If true, frames are replayable. This is important
      when branching: if ``keep=True``, neighboring branches at the same
      level can depend on each other; if ``keep=False``, neighboring branches
      are independent (conditioned on their shared ancestors).
  :param int dim: An optional dimension to use for this independence index.
      Interface stub, behavior not yet implemented.
  :param str name: An optional unique name to help inference algorithms match
      :func:`pyro.markov` sites between models and guides.
      Interface stub, behavior not yet implemented.
class_docstr_tok: ["Markov","dependency","declaration",".","This","is","a","statistical","equivalent","of","a","memory","management","arena",".",":","param","int","history",":","The","number","of","previous","contexts","visible","from","the","current","context",".","Defaults","to","1",".","If","zero",",","this","is","similar","to",":","class",":","`","pyro.plate","`",".",":","param","bool","keep",":","If","true",",","frames","are","replayable",".","This","is","important","when","branching",":","if","``","keep=True","``",",","neighboring","branches","at","the","same","level","can","depend","on","each","other",";","if","``","keep=False","``",",","neighboring","branches","are","independent","(","conditioned","on","their","shared","ancestors",")",".",":","param","int","dim",":","An","optional","dimension","to","use","for","this","independence","index",".","Interface","stub",",","behavior","not","yet","implemented",".",":","param","str","name",":","An","optional","unique","name","to","help","inference","algorithms","match",":","func",":","`","pyro.markov","`","sites","between","models","and","guides",".","Interface","stub",",","behavior","not","yet","implemented","."]
code: def __exit__(self, *args, **kwargs) -> None:
      if not self.keep:
          self._stack.pop()
      self._pos -= 1
      return super().__exit__(*args, **kwargs)
  
file_path: pyro/pyro/poutine/markov_messenger.py
imports: from collections import Counter
  from contextlib import ExitStack
  from typing import TYPE_CHECKING, Iterable, Iterator, List, Optional, Set
  from typing_extensions import Self
  from pyro.poutine.reentrant_messenger import ReentrantMessenger
label_desc: Use image node_id 5 for calling the MarkovMessenger obj's underlying member method code with example usage: obj.__exit__() and returns: super