<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def partial_safe_wraps(wrapped_func, *args, **kwargs):
 """ A version of `functools.wraps` that is safe to wrap a partial in. """

    if isinstance(wrapped_func, functools.partial):
        return partial_safe_wraps(wrapped_func.func)
    else:
        return functools.wraps(wrapped_func)