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

def photo_post_delete_handler(sender, **kwargs):
    '''delete image when rows is gone from database'''
    instance = kwargs.get('instance')
    instance.master.delete(save=False)
    instance.delete_all_renditions()