code: def _context_wrap(
      context: "Messenger",
      fn: Callable,
      *args: Any,
      **kwargs: Any,
  ) -> Any:
      with context:
          return fn(*args, **kwargs)
  
imports: from contextlib import contextmanager
  from functools import partial
  from types import TracebackType
  from typing import Any, Callable, Iterator, List, Optional, Type, TypeVar
  from typing_extensions import ParamSpec, Self
  from pyro.poutine.runtime import _PYRO_STACK, Message
label_desc: Use image node_id 1 for calling a global function with example usage: _context_wrap(context, fn) and returns: fn