<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def wrap(self, value):
        ''' Validate ``value`` and then use the document's class to wrap the
            value'''
        self.validate_wrap(value)
        return self.type.wrap(value)