class_docstr: Messenger that does a nonlocal exit by raising a util.NonlocalExit exception
docstr: :param escape_fn: function that takes a msg as input and returns True
      if the poutine should perform a nonlocal exit at that site.
  
  Constructor.  Stores fn and escape_fn.
docstr_tok: [":","param","escape_fn",":","function","that","takes","a","msg","as","input","and","returns","True","if","the","poutine","should","perform","a","nonlocal","exit","at","that","site",".","Constructor",".","Stores","fn","and","escape_fn","."]
code: def __init__(self, escape_fn: Callable[[Message], bool]) -> None:
      """
      :param escape_fn: function that takes a msg as input and returns True
          if the poutine should perform a nonlocal exit at that site.
  
      Constructor.  Stores fn and escape_fn.
      """
      super().__init__()
      self.escape_fn = escape_fn
  
imports: from typing import Callable
  from pyro.poutine.messenger import Messenger
  from pyro.poutine.runtime import Message, NonlocalExit
label_desc: Use image node_id 1 to create a new EscapeMessenger object from inherited base classes: Messenger with example: obj = EscapeMessenger(escape_fn)