code: def wraps(wrapped):
      
      if isinstance(wrapped, functools.partial):
          return six.wraps(wrapped, assigned=_PARTIAL_VALID_ASSIGNMENTS)
      else:
          return six.wraps(wrapped)
docs: A functools.wraps helper that handles partial objects on Python 2.