@staticmethod
def maybe_unwrap(func):
    """Return the given function, without its probe_wrapper if it has one."""
    if getattr(getattr(func, '__code__', None), 'co_name', ''
        ) == 'probe_wrapper':
        return func.__closure__[0].cell_contents
    else:
        return func
