class_docstr: Capture messages and replays them after leaving the block.
  
  # Examples
  ```python
  pre_replay = lambda: logger.info("something will happen")
  post_replay = lambda: logger.info("something did happen")
  with ReplaySink(pre_replay=pre_replay, post_replay=post_replay) as sink:
      logger.info('captured message')
  ```
code: def write(self, message):
      self.captured.append(message)
  
file_path: icevision/icevision/utils/logger_utils.py
imports: from icevision.imports import *
label_desc: Use image node_id 3 for calling the ReplaySink obj's underlying member method code with example usage: obj.write(message) without return types