def inner_function(partial_fn):
    """Returns the wrapped function of either a partial or curried function."""
    fn = partial_fn.func
    if '__module__' not in dir(fn):
        fn = fn.func
    return fn
