<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def folder_pre_delete(self, request, folder):
 """ Perform folder operations prior to deletions. For example, deleting all contents. """

        for m in folder.members():
            if m.__class__ == folder.__class__:
                self.folder_pre_delete(request, m)
            m.delete()