code: def unwrap(fn: Callable) -> Callable:
      """
      Recursively unwraps poutines.
      """
      while True:
          if isinstance(fn, _bound_partial):
              fn = fn.func
              continue
          if isinstance(fn, partial) and len(fn.args) >= 2:
              fn = fn.args[1]  # extract from partial(handler, fn)
              continue
          return fn
  
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 2 for calling a global function with example usage: unwrap(fn) and returns: fn