<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_patches(self):
 """ Applies the patches. :return: Method success. :rtype: bool """


        success = True
        for name, patch in sorted(self):
            success = self.apply_patch(patch)
        return success