from typing import Callable


def unwrap_callback(callback: Callable) -> Callable:
    """If the callback was wrapped with :func:`.wrap_callback`, this will unwrap it.

    Otherwise, the callback will just be returned unchanged.
    """
    return getattr(callback, 'wrapped', callback)