>>> from structlog import PrintLogger, wrap_logger
>>> from structlog.threadlocal import tmp_bind, wrap_dict
>>> WrappedDictClass = wrap_dict(dict)
>>> log = wrap_logger(PrintLogger(), context_class=WrappedDictClass)
>>> log.bind(x=42)  # doctest: +ELLIPSIS
<BoundLogger(context=<WrappedDict-...({'x': 42})>, ...)>
>>> log.msg('event!')
x=42 event='event!'
>>> with tmp_bind(log, x=23, y='foo') as tmp_log:
...     tmp_log.msg('another event!')
y='foo' x=23 event='another event!'
>>> log.msg('one last event!')
x=42 event='one last event!'
