<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def apply_defaults(self):
 """Apply schema defaults to this document."""

        self.emit('will_apply_defaults')
        self.schema.apply_defaults(self)
        self.emit('did_apply_defaults')