code: def partial_safe_wraps(wrapped_func, *args, **kwargs):
      
      if isinstance(wrapped_func, functools.partial):
          return partial_safe_wraps(wrapped_func.func)
      else:
          return functools.wraps(wrapped_func)
docs: A version of `functools.wraps` that is safe to wrap a partial in.